When looking at the time course data, we noticed an interesting pattern: it seemed as though it would be possible to predict an individual’s group from the difference between their load effect during encoding and their load effect during delay. It seemed as though low capacity subjects had small load effects at both encoding and delay, medium capacity subjects had large load effects at both encoding and delay and high capacity subjects had large load effects at encoding but small ones at delay. As such, we wanted to create a model that used this information to predict span.

To do so, we extracted data from TR 6 for the encoding period and TR 8 for the delay period. This represented 1 TR’s worth of data in the middle of where we’d expect activity from for each period (from our model of the task convolved with a hemodynamic delay function) and where we see maximal differences between group. In addition to the raw load effects, we created two composite variables that we expected to capture the differences between groups. The first was simply the difference between load effects at encoding and delay, and the second was the sum of that difference and the load effect effect at encoding. These measures allow us to create a series of regression models to predict span, BPRS total score and accuracy at high load.

In addition to the univariate load effects, we have also seen a relationship with various measures reflecting multivariate representation across and within trial, including the probability of a MVPA classifer predicting a face at any given point in a trial and the similarity of multivariate representations across and within trials. Both of these measures were taken at each individual trial and averaged, in addition to taken from the average over many trials (which served as a template for the canonical trial type). We added these multivariate measures to see if they improved model performance when added to regression models that only contained variables based on univariate load effects.

Overll, we saw some cross-over in which measures predicted each behavioral variable. Principal components related to encoding-delay in the PFC regions and similarity within TR in low load correct trials in DFR/individual to template across TR in high load correct in fusiform were related to both span and accuracy at high load, while univariate effects in right hemisphere parietal regions in during delay and the encoding + (encoding-delay) measure related to BPRS and accuracy.

In contrast, delay load effect and similarity within TR in low load correct trials in DFR, individual to template across TR in high load correct in fusiform were only related to span; similarity of correct trials (regardless of load) in fusiform, face representation during delay and probe in mostly indiv trials in the fusiform, high incorrect and low correct in fusiform across individual trial were related to BPRS and fusiform similarity during encoding (regardless of accuracy), delay similarity in DFR, how similar high load incorrect trials are to the template correct trials and low load correct trials in fusiform, face representation in DFR encoding and delay for mostly indiv trials and representation during low correct and high incorrect in fusiform averages from template related uniquely to accuracy.

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.2.1     ✓ purrr   0.3.3
## ✓ tibble  2.1.3     ✓ dplyr   0.8.3
## ✓ tidyr   1.0.0     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.4.0
## ── Conflicts ────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(psych)
## 
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
library(rmatio)
library(factoextra)
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
library(patchwork)
library(MASS)
## 
## Attaching package: 'MASS'
## The following object is masked from 'package:patchwork':
## 
##     area
## The following object is masked from 'package:dplyr':
## 
##     select
load('data/behav.RData')
load('data/split_groups_info.RData')
load('data/ITC_fusiform.RData')
similarity_fusiform <- similarity_temp
load('data/ITC_DFR_delay.RData')
similarity_DFR <- similarity_temp 
load("data/MVPA_fusiform.RData")
individual_trial_probs_fusiform <- individual_trial_averages_probs
averages_from_template_fusiform <- averages_from_template
load("data/MVPA_DFR_delay_mask.RData")
individual_trial_probs_DFR <- individual_trial_averages_probs
averages_from_template_DFR <- averages_from_template
load("data/MVPA_HPC.RData")
individual_trial_probs_HPC <- individual_trial_averages_probs
averages_from_template_HPC <- averages_from_template

DFR_ROIs <- c("L aMFG","L dlPFC","L dMFG","L IPS","L preSMA","R dlPFC","R IPS","R medParietal","all delay ROIs")

Prep data

First, we’re going to load in the time courses of the activity from the DFR regions. We’re doing this a little differently from last time, because we don’t want the interpolated data, we just want the one with 14 TRs.

We’re going to remove the subjects that aren’t included in the split group analysis, and put the data in a slightly easier to use format.

temp <- read.mat('data/RSA_DFR_trials.mat')
factors <- matrix(nrow=170)

for (idx in seq.int(1,170)){
  if (constructs_fMRI$PTID[idx] %in% WM_groups[["high"]]$PTID){
    factors[idx] <- "high"
  }else if (constructs_fMRI$PTID[idx] %in% WM_groups[["med"]]$PTID){
    factors[idx] <- "med"
  }else if (constructs_fMRI$PTID[idx] %in% WM_groups[["low"]]$PTID){
    factors[idx] <- "low"
  }else{
    factors[idx] <- "not_incl"
  }
}

factors <- factor(factors, levels=c("low","med","high","not_incl"))
trial_activity_high <- temp[["trial_avg_activity_high"]]
trial_activity_low <- temp[["trial_avg_activity_low"]]

all_data <- list(subjs=constructs_fMRI$PTID,
                 WMC = factors, 
                 L_aMFG = list(
                   high = data.frame(trial_activity_high[,,1,1]),
                   low = data.frame(trial_activity_low[,,1,1])
                 ),
                 L_dlPFC = list(
                   high = data.frame(trial_activity_high[,,1,2]),
                   low = data.frame(trial_activity_low[,,1,2])
                 ),
                 L_dMFG = list(
                   high = data.frame(trial_activity_high[,,1,3]),
                   low = data.frame(trial_activity_low[,,1,3])
                 ), 
                 L_IPS = list(
                   high = data.frame(trial_activity_high[,,1,4]),
                   low = data.frame(trial_activity_low[,,1,4])
                 ), 
                 L_preSMA = list(
                   high = data.frame(trial_activity_high[,,1,5]),
                   low = data.frame(trial_activity_low[,,1,5])
                 ), 
                 R_dlPFC = list(
                   high = data.frame(trial_activity_high[,,1,6]),
                   low = data.frame(trial_activity_low[,,1,6])
                 ),
                 R_IPS = list(
                   high = data.frame(trial_activity_high[,,1,7]),
                   low = data.frame(trial_activity_low[,,1,7])
                 ),
                 R_medParietal = list(
                   high = data.frame(trial_activity_high[,,1,8]),
                   low = data.frame(trial_activity_low[,,1,8])
                 ),
                 all_delay = list(
                   high = data.frame(trial_activity_high[,,1,9]),
                   low = data.frame(trial_activity_low[,,1,9])
                 )
)

Now, we’re going to calculate load effects for each ROI at every time point.

for (ROI in seq.int(3,11)){
  all_data[[ROI]][["load_effect"]] <- all_data[[ROI]][["high"]]-all_data[[ROI]][["low"]]
  temp <- data.frame(group = all_data[["WMC"]], all_data[[ROI]][["load_effect"]])
  all_data[[ROI]][["SVM"]] <- temp
}

Now, let’s pull out thhe encoding and delay values - we’re also going to calculate the difference between encoding and delay, and encoding + (encoding-delay), because we think that this is going to be useful. We’re going to include all these measures, plus span, in a convenient dataframe.

for (ROI in seq.int(3,11)){
  temp <- data.frame(matrix(nrow=170, ncol=6))
  colnames(temp) <- c("group","encoding","delay","encoding_delay","encoding_delay_comb" ,"span")
  temp$group <- all_data[["WMC"]]
  temp$span <- constructs_fMRI$omnibus_span_no_DFR_MRI
  
  temp$encoding <- all_data[[ROI]][["load_effect"]][,6]
  #temp$delay <- rowMeans(all_data[[ROI]][["load_effect"]][,8:9])
  
  temp$delay <- all_data[[ROI]][["load_effect"]][,8]
  temp$encoding_delay <- temp$encoding - temp$delay
  temp$encoding_delay_comb <- temp$encoding + temp$encoding_delay 
  temp$high_acc <- p200_data$XDFR_MRI_ACC_L3[p200_data$PTID %in% constructs_fMRI$PTID]
  
  temp$BPRS <- p200_clinical_zscores$BPRS_TOT[p200_clinical_zscores$PTID %in% constructs_fMRI$PTID]
  
  all_data[[ROI]][["SVM_2"]] <- temp
  
}

Relationship between Span and Encoding - Delay

All regions except for L aMFG have significant relationships

ROI_plot_list <- list()

for (ROI in seq.int(3,11)){
  correlation_test <- cor.test(all_data[[ROI]][["SVM_2"]]$span,all_data[[ROI]][["SVM_2"]]$encoding_delay)
  
  ROI_plot_list[[DFR_ROIs[ROI-2]]] <- ggplot(data=all_data[[ROI]][["SVM_2"]])+
    geom_point(aes(x=span,y=encoding_delay_comb,color=group))+
    stat_smooth(aes(x=span,y=encoding_delay_comb),method="lm",color="black")+
    ggtitle(paste(DFR_ROIs[ROI-2], ", r = ",round(correlation_test$estimate,digits=3)))+
    xlab("WM Span")+
    ylab("LE Difference")+
    theme_classic()
  
}

(ROI_plot_list[[1]] + ROI_plot_list[[2]]) /
  (ROI_plot_list[[3]] + ROI_plot_list[[4]]) +  
  plot_annotation(title = "Correlation between (encoding LE + encoding/delay LE difference) and span ")+
  plot_layout(guides="collect")

(ROI_plot_list[[5]] + ROI_plot_list[[6]]) /
  (ROI_plot_list[[7]] + ROI_plot_list[[8]]) +
  plot_layout(guides="collect")

ROI_plot_list[[9]]   

Explore data

data_for_reg <- data.frame(span = all_data[["all_delay"]][["SVM_2"]]$span,
                           high_acc = all_data[["all_delay"]][["SVM_2"]]$high_acc, BPRS = all_data[["all_delay"]][["SVM_2"]]$BPRS,
                           L_aMFG_enc = all_data[[3]][["SVM_2"]]$encoding, L_aMFG_delay = all_data[[3]][["SVM_2"]]$delay, 
                           L_dlPFC_enc = all_data[[4]][["SVM_2"]]$encoding, L_dlPFC_delay = all_data[[4]][["SVM_2"]]$delay,
                           L_dMFG_enc = all_data[[5]][["SVM_2"]]$encoding, L_dMFG_delay = all_data[[5]][["SVM_2"]]$delay,
                           L_IPS_enc = all_data[[6]][["SVM_2"]]$encoding, L_IPS_delay = all_data[[6]][["SVM_2"]]$delay,
                           L_preSMA_enc = all_data[[7]][["SVM_2"]]$encoding, L_preSMA_delay = all_data[[7]][["SVM_2"]]$delay,
                           R_dlPFC_enc = all_data[[8]][["SVM_2"]]$encoding, R_dlPFC_delay = all_data[[8]][["SVM_2"]]$delay,
                           R_IPS_enc = all_data[[9]][["SVM_2"]]$encoding, R_IPS_delay = all_data[[9]][["SVM_2"]]$delay,
                           R_medPar_enc = all_data[[10]][["SVM_2"]]$encoding, R_medPar_delay = all_data[[10]][["SVM_2"]]$delay,
                           all_delay_enc = all_data[[11]][["SVM_2"]]$encoding, all_delay_delay = all_data[[11]][["SVM_2"]]$delay,
                           L_aMFG_enc_delay = all_data[[3]][["SVM_2"]]$encoding_delay, 
                           L_dlPFC_enc_delay = all_data[[4]][["SVM_2"]]$encoding_delay, 
                           L_dMFG_enc_delay = all_data[[5]][["SVM_2"]]$encoding_delay,
                           L_IPS_enc_delay = all_data[[6]][["SVM_2"]]$encoding_delay, 
                           L_preSMA_enc_delay = all_data[[7]][["SVM_2"]]$encoding_delay, 
                           R_dlPFC_enc_delay = all_data[[8]][["SVM_2"]]$encoding_delay, 
                           R_IPS_enc_delay = all_data[[9]][["SVM_2"]]$encoding_delay,
                           R_medPar_enc_delay = all_data[[10]][["SVM_2"]]$encoding_delay,
                           L_aMFG_enc_delay_comb = all_data[[3]][["SVM_2"]]$encoding_delay_comb, 
                           L_dlPFC_enc_delay_comb = all_data[[4]][["SVM_2"]]$encoding_delay_comb, 
                           L_dMFG_enc_delay_comb = all_data[[5]][["SVM_2"]]$encoding_delay_comb,
                           L_IPS_enc_delay_comb = all_data[[6]][["SVM_2"]]$encoding_delay_comb, 
                           L_preSMA_enc_delay_comb = all_data[[7]][["SVM_2"]]$encoding_delay_comb, 
                           R_dlPFC_enc_delay_comb = all_data[[8]][["SVM_2"]]$encoding_delay_comb, 
                           R_IPS_enc_delay_comb = all_data[[9]][["SVM_2"]]$encoding_delay_comb,
                           R_medPar_enc_delay_comb = all_data[[10]][["SVM_2"]]$encoding_delay_comb, 
                           R_all_delay_enc_delay_comb = all_data[[11]][["SVM_2"]]$encoding_delay_comb, 
                           high_corr_fus_enc = similarity_fusiform[["high_correct_avg"]]$X6, 
                           high_corr_fus_delay = similarity_fusiform[["high_correct_avg"]]$X8, 
                           high_incorr_fus_enc = similarity_fusiform[["high_incorrect_avg"]]$X6,
                           high_incorr_fus_del = similarity_fusiform[["high_incorrect_avg"]]$X8,
                           low_corr_fus_enc = similarity_fusiform[["low_correct_avg"]]$X6,
                           low_corr_fus_del = similarity_fusiform[["low_correct_avg"]]$X8, 
                           correct_encoding_to_correct_delay_fus = similarity_fusiform[["correct_encoding_to_correct_delay"]],
                           correct_enc_to_delay_fus_high_corr = similarity_fusiform[["correct_encoding_to_delay_avg"]][,4],
                           enc_to_correct_delay_fus_high_corr = similarity_fusiform[["encoding_to_correct_delay_avg"]][,4],
                           high_corr_DFR_enc = similarity_DFR[["high_correct_avg"]]$X6, 
                           high_corr_DFR_delay = similarity_DFR[["high_correct_avg"]]$X8, 
                           high_incorr_DFR_enc = similarity_DFR[["high_incorrect_avg"]]$X6,
                           high_incorr_DFR_del = similarity_DFR[["high_incorrect_avg"]]$X8,
                           low_corr_DFR_enc = similarity_DFR[["low_correct_avg"]]$X6,
                           low_corr_DFR_del = similarity_DFR[["low_correct_avg"]]$X8, 
                           correct_encoding_to_correct_delay_DFR = similarity_DFR[["correct_encoding_to_correct_delay"]],
                           correct_enc_to_delay_DFR_high_corr = similarity_DFR[["correct_encoding_to_delay_avg"]][,4],
                           enc_to_correct_delay_DFR_high_corr = similarity_DFR[["encoding_to_correct_delay_avg"]][,4],
                           indiv_trial_avgs_high_correct_fusiform_enc = individual_trial_probs_fusiform[["high_correct"]]$V6,
                           indiv_trial_avgs_high_correct_fusiform_delay = individual_trial_probs_fusiform[["high_correct"]]$V8,
                           indiv_trial_avgs_high_correct_fusiform_probe = individual_trial_probs_fusiform[["high_correct"]]$V11,
                           indiv_trial_avgs_high_correct_DFR_enc = individual_trial_probs_DFR[["high_correct"]]$V6,
                           indiv_trial_avgs_high_correct_DFR_delay = individual_trial_probs_DFR[["high_correct"]]$V8,
                           indiv_trial_avgs_high_correct_DFR_probe = individual_trial_probs_DFR[["high_correct"]]$V11,
                           indiv_trial_avgs_high_incorrect_fusiform_enc = individual_trial_probs_fusiform[["high_incorrect"]]$V6,
                           indiv_trial_avgs_high_incorrect_fusiform_delay = individual_trial_probs_fusiform[["high_incorrect"]]$V8,
                           indiv_trial_avgs_high_incorrect_fusiform_probe = individual_trial_probs_fusiform[["high_incorrect"]]$V11,
                           indiv_trial_avgs_high_incorrect_DFR_enc = individual_trial_probs_DFR[["high_incorrect"]]$V6,
                           indiv_trial_avgs_high_incorrect_DFR_delay = individual_trial_probs_DFR[["high_incorrect"]]$V8,
                           indiv_trial_avgs_high_incorrect_DFR_probe = individual_trial_probs_DFR[["high_incorrect"]]$V11,
                           indiv_trial_avgs_low_correct_fusiform_enc = individual_trial_probs_fusiform[["low_correct"]]$V6,
                           indiv_trial_avgs_low_correct_fusiform_delay = individual_trial_probs_fusiform[["low_correct"]]$V8,
                           indiv_trial_avgs_low_correct_fusiform_probe = individual_trial_probs_fusiform[["low_correct"]]$V11,
                           indiv_trial_avgs_low_correct_DFR_enc = individual_trial_probs_DFR[["low_correct"]]$V6,
                           indiv_trial_avgs_low_correct_DFR_delay = individual_trial_probs_DFR[["low_correct"]]$V8,
                           indiv_trial_avgs_low_correct_DFR_probe = individual_trial_probs_DFR[["low_correct"]]$V11,
                           averages_from_template_high_correct_fusiform_enc = averages_from_template_fusiform[["high_correct"]]$V6,
                           averages_from_template_high_correct_fusiform_delay = averages_from_template_fusiform[["high_correct"]]$V8,
                           averages_from_template_high_correct_fusiform_probe = averages_from_template_fusiform[["high_correct"]]$V11,
                           averages_from_template_high_correct_DFR_enc = averages_from_template_DFR[["high_correct"]]$V6,
                           averages_from_template_high_correct_DFR_delay = averages_from_template_DFR[["high_correct"]]$V8,
                           averages_from_template_high_correct_DFR_probe = averages_from_template_DFR[["high_correct"]]$V11,
                           averages_from_template_high_incorrect_fusiform_enc = averages_from_template_fusiform[["high_incorrect"]]$V6,
                           averages_from_template_high_incorrect_fusiform_delay = averages_from_template_fusiform[["high_incorrect"]]$V8,
                           averages_from_template_high_incorrect_fusiform_probe = averages_from_template_fusiform[["high_incorrect"]]$V11,
                           averages_from_template_high_incorrect_DFR_enc = averages_from_template_DFR[["high_incorrect"]]$V6,
                           averages_from_template_high_incorrect_DFR_delay = averages_from_template_DFR[["high_incorrect"]]$V8,
                           averages_from_template_high_incorrect_DFR_probe = averages_from_template_DFR[["high_incorrect"]]$V11,
                           averages_from_template_low_correct_fusiform_enc = averages_from_template_fusiform[["low_correct"]]$V6,
                           averages_from_template_low_correct_fusiform_delay = averages_from_template_fusiform[["low_correct"]]$V8,
                           averages_from_template_low_correct_fusiform_probe = averages_from_template_fusiform[["low_correct"]]$V11,
                           averages_from_template_low_correct_DFR_enc = averages_from_template_DFR[["low_correct"]]$V6,
                           averages_from_template_low_correct_DFR_delay = averages_from_template_DFR[["low_correct"]]$V8,
                           averages_from_template_low_correct_DFR_probe = averages_from_template_DFR[["low_correct"]]$V11
)

From these plots, we can see that our measeures are high correlated.

Within encoding load effects

pairs.panels(data_for_reg[,c(4,6,8,10,12,14,16,18)], density=TRUE)

Within delay load effects

pairs.panels(data_for_reg[,c(5,7,9,11,13,15,17,19)], density=TRUE)

Encoding - Delay

pairs.panels(data_for_reg[,c(22:29)], density= TRUE)

Within TR Similarity

pairs.panels(data_for_reg[,c(39:44,49:53)])

Across TR Similarity

pairs.panels(data_for_reg[,c(45:47,53:56)])

Within Inidivdual MPVA trials - fusiform

pairs.panels(data_for_reg[,c(57:59,63:65,69:71)])

Within Inidivdual MPVA trials - delay

pairs.panels(data_for_reg[,c(60:62,66:68,72:74)])

Within MPVA templates - fusiform

pairs.panels(data_for_reg[,c(75:77,81:83,87:89)])

Within MPVA templates - delay

pairs.panels(data_for_reg[,c(78:80,84:86,90:92)])

Run PCAs

Univariate effects

We know that our variables are highly correlated, so to deal with multi-collinearity, we’re going to try to run a PCA on all the encoding load effects, delay load effects and encoding - delay. It looks like the first 3 dimensions carry most of the variance (77%), so we’re going to stick with those three.

The first variable loads on encoding load effects and the combined encoding+encoding-delay in the PFC regions, load effect during delay, the second on delay load effect and the third on encoding - delay in parietal regions.

res.pca <- prcomp(data_for_reg[,c(4:19, 22:37)], scale = TRUE)
fviz_eig(res.pca)

summary(res.pca)
## Importance of components:
##                           PC1   PC2     PC3     PC4     PC5     PC6     PC7
## Standard deviation     3.7908 2.811 1.65063 1.09084 1.00491 0.93056 0.80212
## Proportion of Variance 0.4491 0.247 0.08514 0.03719 0.03156 0.02706 0.02011
## Cumulative Proportion  0.4491 0.696 0.78119 0.81837 0.84993 0.87699 0.89710
##                            PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Standard deviation     0.76707 0.71693 0.68174 0.64478 0.58292 0.55500 0.53242
## Proportion of Variance 0.01839 0.01606 0.01452 0.01299 0.01062 0.00963 0.00886
## Cumulative Proportion  0.91549 0.93155 0.94607 0.95906 0.96968 0.97931 0.98817
##                           PC15    PC16     PC17      PC18      PC19      PC20
## Standard deviation     0.47888 0.38646 7.17e-16 3.563e-16 3.271e-16 3.249e-16
## Proportion of Variance 0.00717 0.00467 0.00e+00 0.000e+00 0.000e+00 0.000e+00
## Cumulative Proportion  0.99533 1.00000 1.00e+00 1.000e+00 1.000e+00 1.000e+00
##                             PC21      PC22      PC23      PC24      PC25
## Standard deviation     3.249e-16 3.249e-16 3.249e-16 3.249e-16 3.249e-16
## Proportion of Variance 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
## Cumulative Proportion  1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00
##                             PC26      PC27      PC28      PC29      PC30
## Standard deviation     3.249e-16 3.249e-16 3.249e-16 3.249e-16 3.249e-16
## Proportion of Variance 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
## Cumulative Proportion  1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00
##                             PC31      PC32
## Standard deviation     3.249e-16 8.156e-17
## Proportion of Variance 0.000e+00 0.000e+00
## Cumulative Proportion  1.000e+00 1.000e+00
res.var <- get_pca_var(res.pca)
res.var$contrib        # Contributions to the PCs
##                             Dim.1      Dim.2        Dim.3       Dim.4
## L_aMFG_enc              5.3891319 0.47119180  0.888115784  0.36395876
## L_aMFG_delay            0.8226601 8.30932520  0.161685785  5.30343379
## L_dlPFC_enc             5.1548713 0.19826396  2.373438821  2.75026006
## L_dlPFC_delay           0.8379575 8.01469715  0.117445309  4.15914356
## L_dMFG_enc              3.8686045 0.85706847  1.164896007  6.16741622
## L_dMFG_delay            0.1022154 7.46291800  0.008000602  9.16696186
## L_IPS_enc               4.7377580 1.39325395  1.224394885  0.39584075
## L_IPS_delay             1.0231861 8.19702653  0.338261276  0.03533589
## L_preSMA_enc            5.1446938 0.32011044  2.217134905  3.17955097
## L_preSMA_delay          0.8476296 7.65183437  0.109230087  2.04246883
## R_dlPFC_enc             4.8411481 0.58400281  0.660233258  8.57086183
## R_dlPFC_delay           0.4665321 8.49680253  0.001860368  3.88823718
## R_IPS_enc               4.6816446 1.10080762  4.315200235  2.04909637
## R_IPS_delay             1.3096340 7.49613390  0.465936108  6.41418179
## R_medPar_enc            3.2808053 1.10075964  7.876768303  6.19113578
## R_medPar_delay          0.9113219 5.91997922  0.227520498 16.91789118
## L_aMFG_enc_delay        2.5324146 4.73490205  2.032870916  2.81926059
## L_dlPFC_enc_delay       2.7789692 4.99259214  1.960353495  0.01134452
## L_dMFG_enc_delay        2.6097636 3.62950352  0.951155098  0.44867111
## L_IPS_enc_delay         2.7587888 3.17762904  4.472413792  1.07537730
## L_preSMA_enc_delay      2.9225616 3.56323490  3.901315764  0.49062485
## R_dlPFC_enc_delay       3.2093707 3.99485392  0.750404939  1.80412108
## R_IPS_enc_delay         1.8786624 3.44107339 11.369746524  1.30541423
## R_medPar_enc_delay      1.1590509 2.19063291 14.875619645  2.74212080
## L_aMFG_enc_delay_comb   5.0769737 0.62074833  1.804032417  0.31835510
## L_dlPFC_enc_delay_comb  4.9534742 0.83706460  2.729483644  0.85938824
## L_dMFG_enc_delay_comb   4.3869148 0.33860905  1.443745630  1.10438546
## L_IPS_enc_delay_comb    4.9935247 0.01495033  3.124513783  0.85155346
## L_preSMA_enc_delay_comb 4.9097908 0.42407936  3.603717963  1.98007920
## R_dlPFC_enc_delay_comb  5.1030170 0.36967175  0.889223751  6.01662206
## R_IPS_enc_delay_comb    4.3856493 0.08036282  9.428010721  0.10822018
## R_medPar_enc_delay_comb 2.9212793 0.01591632 14.513269687  0.46868698
##                                Dim.5       Dim.6        Dim.7       Dim.8
## L_aMFG_enc              2.191788e-03  0.20964029 7.712767e+00  0.03824134
## L_aMFG_delay            9.687208e-02  0.12110441 2.321384e-02  4.55847334
## L_dlPFC_enc             9.108968e-02  2.60273811 4.210358e+00  2.42948142
## L_dlPFC_delay           1.339513e-01  1.30724088 1.770957e-01  4.50186461
## L_dMFG_enc              7.905999e+00 12.72284008 2.654925e+00  9.12659161
## L_dMFG_delay            6.012391e-01  0.17156884 3.215105e+00 43.05370597
## L_IPS_enc               8.176725e+00  1.68875826 1.766065e+00  0.23846660
## L_IPS_delay             9.968879e-01  0.51285308 2.272607e+00  0.05392658
## L_preSMA_enc            1.261368e-01  2.62051097 2.434397e+00  0.30489165
## L_preSMA_delay          2.111877e+00  1.35803414 1.751194e-01  3.64893694
## R_dlPFC_enc             4.696895e-01  1.64840315 9.644213e+00  0.04769402
## R_dlPFC_delay           7.404954e-01  0.06356039 4.579126e-01  2.20293291
## R_IPS_enc               1.568018e+00  0.21383279 2.051265e-02  0.06899940
## R_IPS_delay             1.502662e-05  0.31090846 1.174455e+00  0.03354544
## R_medPar_enc            8.147835e+00  0.14723808 8.788306e-01  2.49026583
## R_medPar_delay          2.969242e-01  8.09328107 2.103845e-01  1.66990002
## L_aMFG_enc_delay        1.337204e-01  0.02035708 9.962873e+00  3.80214280
## L_dlPFC_enc_delay       4.798263e-01  0.50183655 3.607073e+00  0.08887450
## L_dMFG_enc_delay        1.283097e+01  9.61391157 5.748055e-02 14.34202288
## L_IPS_enc_delay         6.579791e+00  6.36066813 3.115424e-04  0.13433045
## L_preSMA_enc_delay      8.585519e-01  0.57214691 4.560442e+00  1.25899066
## R_dlPFC_enc_delay       5.780333e-03  2.82995347 7.894993e+00  1.46069449
## R_IPS_enc_delay         2.412406e+00  1.48548791 2.042080e+00  0.28961034
## R_medPar_enc_delay      7.673975e+00 13.23109526 3.561902e-01  0.17864213
## L_aMFG_enc_delay_comb   5.231659e-02  0.12274324 1.145020e+01  0.91244969
## L_dlPFC_enc_delay_comb  2.963849e-01  1.76958663 4.922183e+00  0.58801344
## L_dMFG_enc_delay_comb   1.400786e+01 15.20150770 6.512064e-01  0.22069299
## L_IPS_enc_delay_comb    9.772634e+00  4.38907468 7.248432e-01  0.24829542
## L_preSMA_enc_delay_comb 7.528156e-02  1.79605150 4.094281e+00  0.06804776
## R_dlPFC_enc_delay_comb  1.344995e-01  2.74422258 1.114123e+01  0.26258824
## R_IPS_enc_delay_comb    2.572048e+00  0.85541583 6.865057e-01  0.19881970
## R_medPar_enc_delay_comb 1.064800e+01  4.71342794 8.201517e-01  1.47786682
##                                Dim.9       Dim.10       Dim.11      Dim.12
## L_aMFG_enc              13.278170174  0.109731528 4.033356e-01  0.42801950
## L_aMFG_delay             1.342858718  0.917286020 1.994876e+00  1.93776465
## L_dlPFC_enc              0.878516318  4.317530491 7.051428e+00  1.45697474
## L_dlPFC_delay            1.268545237  0.189190762 2.162303e+00  2.38867922
## L_dMFG_enc               0.146003756  0.065136254 1.029398e+00  0.38021257
## L_dMFG_delay             0.046964789  0.437974138 1.770550e-03  0.57839925
## L_IPS_enc                0.013463451  4.682815175 1.505287e+00  4.31087651
## L_IPS_delay              1.172436421 18.403683386 8.471263e+00  0.13718635
## L_preSMA_enc             5.133685342  6.624477714 4.407162e-01  0.48161426
## L_preSMA_delay           5.289776045  9.108170935 6.100037e+00  0.23304554
## R_dlPFC_enc              0.144442372  7.774814960 3.882862e-02  0.40397005
## R_dlPFC_delay            4.251145239 14.739325156 5.736845e+00  9.68615414
## R_IPS_enc                1.793446114  0.420869858 6.020588e+00  7.20554551
## R_IPS_delay              1.606333951  2.110097765 7.432278e+00  1.54425894
## R_medPar_enc             0.035308393  0.960331963 8.150868e+00  1.41203351
## R_medPar_delay           0.066299785  0.891710489 1.293636e+01  2.40534491
## L_aMFG_enc_delay         7.651060649  1.762566526 5.523870e-01  4.47906410
## L_dlPFC_enc_delay        0.001208272  7.590465302 2.444434e+00  8.11881280
## L_dMFG_enc_delay         0.362105252  0.185686047 1.096361e+00  0.03075567
## L_IPS_enc_delay          1.219408960  4.649779406 3.157977e+00  5.16920385
## L_preSMA_enc_delay      21.575960240  0.019513572 2.271140e+00  1.48951803
## R_dlPFC_enc_delay        2.538278841  0.409947298 6.577741e+00 14.11435216
## R_IPS_enc_delay          0.041211220  0.756275304 8.914974e-03  3.62824139
## R_medPar_enc_delay       0.260708314  0.010770587 4.145118e-01  0.10776837
## L_aMFG_enc_delay_comb   13.572919213  0.857864744 9.702658e-04  2.40692837
## L_dlPFC_enc_delay_comb   0.288758625  7.212139669 5.756511e+00  4.92392973
## L_dMFG_enc_delay_comb    0.332049066  0.011016627 1.454776e+00  0.06533131
## L_IPS_enc_delay_comb     0.224594341  0.107951579 7.993100e-03  6.12184543
## L_preSMA_enc_delay_comb 13.999429621  2.489407071 1.566848e-01  1.08323273
## R_dlPFC_enc_delay_comb   0.385329145  1.732547397 2.189785e+00  5.63480254
## R_IPS_enc_delay_comb     0.928287991  0.001042925 2.325207e+00  7.30853075
## R_medPar_enc_delay_comb  0.151294148  0.449879351 2.108423e+00  0.32760312
##                               Dim.13       Dim.14       Dim.15       Dim.16
## L_aMFG_enc               2.055304420  1.301848254 11.122356297 4.714024e-01
## L_aMFG_delay            10.229182560  0.172424578 28.663347755 3.203287e+00
## L_dlPFC_enc              3.348577186  0.352525524  4.559006342 4.803500e-01
## L_dlPFC_delay           24.838072816 12.859716846  5.179478325 2.557820e+00
## L_dMFG_enc               0.159879157  1.056206127  0.056890684 1.199356e-01
## L_dMFG_delay             0.042679075  0.077706875  0.008190717 3.792668e-03
## L_IPS_enc                0.698135805  0.045158330  2.074201114 7.537944e+00
## L_IPS_delay              0.928100936  0.294634121  0.414719789 2.286884e+01
## L_preSMA_enc             0.430217645 11.910671123  0.002018598 1.615081e-04
## L_preSMA_delay           0.037398610 31.019799712  2.329721060 9.499498e-01
## R_dlPFC_enc              1.276603225  3.381070858  0.283093903 2.854704e+00
## R_dlPFC_delay            4.705479940  5.596719026  0.316058002 8.685663e+00
## R_IPS_enc                0.536009590  0.004190656  0.109314453 1.169153e+01
## R_IPS_delay              4.922707021  0.313529270  5.846535005 2.425481e+01
## R_medPar_enc             0.367270582  1.665193314  0.030146981 1.046965e-01
## R_medPar_delay           4.961217757  9.065157070  0.774502953 1.337381e-01
## L_aMFG_enc_delay         2.848848821  0.661086897  3.292189228 1.143972e+00
## L_dlPFC_enc_delay        7.606770498  7.822773151  0.040342374 5.869520e-01
## L_dMFG_enc_delay         0.033197376  0.531090587  0.020302180 1.649701e-01
## L_IPS_enc_delay          4.860458134  0.124357162  6.872486750 3.880322e+00
## L_preSMA_enc_delay       0.314523092  1.444614239  1.800915875 8.162426e-01
## R_dlPFC_enc_delay        0.739542733  0.067461955  1.311378135 9.912395e-01
## R_IPS_enc_delay         12.052059523  0.320088162 10.253686599 2.047910e+00
## R_medPar_enc_delay       3.149255630  3.388709658  1.416772407 6.277596e-01
## L_aMFG_enc_delay_comb    0.005755984  1.264365038  0.968108786 3.235184e-02
## L_dlPFC_enc_delay_comb   0.137089243  1.262646001  1.882061558 4.476829e-05
## L_dMFG_enc_delay_comb    0.115462146  1.053822341  0.049539608 1.939339e-01
## L_IPS_enc_delay_comb     2.679451418  0.001427464  4.997653816 6.362974e-01
## L_preSMA_enc_delay_comb  0.456080563  1.940086974  0.451459509 2.279751e-01
## R_dlPFC_enc_delay_comb   0.045918522  0.910781278  0.854790771 2.253636e-01
## R_IPS_enc_delay_comb     5.104207601  0.062578579  3.470203187 2.117068e+00
## R_medPar_enc_delay_comb  0.314542392  0.027558829  0.548527238 3.889646e-01
##                               Dim.17      Dim.18      Dim.19      Dim.20
## L_aMFG_enc               0.000000000  0.00000000  0.00000000  0.00000000
## L_aMFG_delay             0.006101393  0.12110579  0.33680427  0.07045756
## L_dlPFC_enc              1.043325227  6.93374374  7.42820073  2.68422171
## L_dlPFC_delay            0.272418316  6.05502573  2.83978943  3.99269389
## L_dMFG_enc               7.105352254  0.87351929  0.58105734  1.57192438
## L_dMFG_delay            10.149786307  2.32240612  1.61853821  2.21295991
## L_IPS_enc                1.956502374  1.73081613  0.62900719  2.00492042
## L_IPS_delay              0.287554752  3.94494665  0.38563134  4.31671601
## L_preSMA_enc             1.242245842  3.09874780  0.59041769  2.07214541
## L_preSMA_delay           0.084453627  2.74456742  1.34708257  5.42118126
## R_dlPFC_enc              5.371738369  6.98657500  2.38553148 12.00019383
## R_dlPFC_delay            0.147391522  0.16898178  2.26243513  2.50893744
## R_IPS_enc                0.255242007  0.39368903 10.74327827  3.15055996
## R_IPS_delay              1.120680510  0.15652832  5.60520297  3.39359000
## R_medPar_enc             0.588011120  0.01982035 11.58793138  1.53307154
## R_medPar_delay           1.087232077  2.95184434 14.70134269  0.25795260
## L_aMFG_enc_delay         0.023816427  0.47272928  1.31469552  0.27502693
## L_dlPFC_enc_delay        3.958528177  7.56967335  1.13110754  7.17713513
## L_dMFG_enc_delay        12.081560782  4.02733433  2.86794014  2.60435856
## L_IPS_enc_delay          3.998033370  5.83630208  0.21351394  6.23291404
## L_preSMA_enc_delay       0.125670500  4.26732828  3.46262360 14.62037209
## R_dlPFC_enc_delay        1.660245095  2.32304156  2.86288232  0.01909799
## R_IPS_enc_delay          2.039783425  0.03281356  2.15343954  3.11577874
## R_medPar_enc_delay       6.307229425 10.17581203 15.83021363  0.01899968
## L_aMFG_enc_delay_comb    0.019722563  0.39147069  1.08870929  0.22775188
## L_dlPFC_enc_delay_comb   7.545424953  0.14948429  1.66570997  1.33892074
## L_dMFG_enc_delay_comb    0.440955303  0.81504527  0.61553377  0.08668369
## L_IPS_enc_delay_comb     9.556747667  1.99731423  0.02189456  2.00772081
## L_preSMA_enc_delay_comb  1.673581079  0.23057699  1.27997024  5.97289640
## R_dlPFC_enc_delay_comb  10.005880585 13.38772728  0.08541686  7.75929190
## R_IPS_enc_delay_comb     0.982610807  0.09829240  1.28207882  0.10762238
## R_medPar_enc_delay_comb  8.862174146  9.72273689  1.08201955  1.24390311
##                               Dim.21       Dim.22      Dim.23       Dim.24
## L_aMFG_enc              0.000000e+00  0.000000000  0.00000000  0.000000000
## L_aMFG_delay            8.830110e-01  0.499768730  0.87570406  0.418486909
## L_dlPFC_enc             9.998353e+00  1.905523449  3.91610205  2.702886785
## L_dlPFC_delay           1.780092e-01  0.287023160  1.43484365  1.032513193
## L_dMFG_enc              3.508705e+00  7.212429879  0.30603235 12.353085766
## L_dMFG_delay            9.909390e-02  5.729591056  0.72408473  8.065953919
## L_IPS_enc               5.029401e-01  0.936744494  8.10147045  0.170651311
## L_IPS_delay             5.521610e-01  2.533975817 10.31846484  0.240014369
## L_preSMA_enc            2.936076e-01  0.327458269  7.84272780  0.010832678
## L_preSMA_delay          1.961293e-01  1.984324152  3.61405493  0.738938902
## R_dlPFC_enc             5.266699e+00  0.102882697  0.60871441  1.773200300
## R_dlPFC_delay           3.398146e+00  1.262053326  4.02785249  0.310020067
## R_IPS_enc               1.145978e-02  0.785134323  2.46820943 17.654254759
## R_IPS_delay             1.047153e-02  0.522953292  1.31995469  7.525592219
## R_medPar_enc            5.881066e+00  0.003177578  5.38783020  5.594064753
## R_medPar_delay          7.008768e+00  1.118243417  1.02591193  0.074318895
## L_aMFG_enc_delay        3.446781e+00  1.950817641  3.41825893  1.633538864
## L_dlPFC_enc_delay       3.765138e+00  0.014217121  0.51691043  0.410534319
## L_dMFG_enc_delay        6.266682e+00  3.691071289  1.18566695  3.793452261
## L_IPS_enc_delay         5.433797e-01 12.177061508 11.25690564  1.351342680
## L_preSMA_enc_delay      2.389280e-01  6.651479831  2.80939479  3.908917567
## R_dlPFC_enc_delay       2.938004e+00  4.034473732 11.58052090  0.002840769
## R_IPS_enc_delay         6.936537e-02  3.862718456  0.52969677  1.892676945
## R_medPar_enc_delay      7.204436e+00  3.755120473  0.02244739  2.280664920
## L_aMFG_enc_delay_comb   2.854305e+00  1.615486823  2.83068604  1.352745872
## L_dlPFC_enc_delay_comb  2.029953e+01  1.631105169  0.97527312  0.607296260
## L_dMFG_enc_delay_comb   1.397177e+01  0.455299292  0.20272113  1.862647450
## L_IPS_enc_delay_comb    3.743739e-02 18.122506922  1.38161220  2.214723872
## L_preSMA_enc_delay_comb 4.183294e-05  3.957436104  0.61407565  3.956492963
## R_dlPFC_enc_delay_comb  1.014874e-01  2.624941133  6.48029822  1.371038572
## R_IPS_enc_delay_comb    1.148533e-01  6.744414096  0.26939917  3.770037190
## R_medPar_enc_delay_comb 3.592415e-01  3.500566770  3.95417465 10.926234674
##                               Dim.25     Dim.26       Dim.27       Dim.28
## L_aMFG_enc               0.000000000 0.00000000 0.000000e+00  0.000000000
## L_aMFG_delay             0.860378677 0.83754188 2.674349e+00  3.818779784
## L_dlPFC_enc              0.099465869 1.98848308 1.585473e+01  0.307890978
## L_dlPFC_delay            0.667530363 4.25919874 5.346068e+00  0.200855111
## L_dMFG_enc               2.271743797 1.76288806 7.731710e-01  1.863149755
## L_dMFG_delay             1.115902849 0.92095597 2.014670e-01  0.242259560
## L_IPS_enc                5.472462450 6.41528253 2.301879e+00 27.359997656
## L_IPS_delay              2.814187909 0.25066743 9.000545e-01  6.242389536
## L_preSMA_enc             5.255830127 7.82405659 1.232492e+01  1.626161528
## L_preSMA_delay           2.102870177 1.74661137 4.990691e+00  0.764225166
## R_dlPFC_enc             13.985520547 7.67062879 2.718750e-01  0.001341535
## R_dlPFC_delay           10.046214629 2.33879585 2.656597e-01  1.195551182
## R_IPS_enc                0.205983584 2.89154378 1.775683e+00  0.209755633
## R_IPS_delay              0.009637319 0.04252043 2.235876e+00  0.343547635
## R_medPar_enc             0.002047625 5.83057377 4.680444e+00  0.049776954
## R_medPar_delay           0.044025623 0.75889286 5.556915e-01  0.335642640
## L_aMFG_enc_delay         3.358437211 3.26929515 1.043916e+01 14.906380729
## L_dlPFC_enc_delay        1.990655774 9.10805659 1.546617e+00  0.188437264
## L_dMFG_enc_delay        12.742955843 0.26675284 3.823322e-04  0.181965445
## L_IPS_enc_delay          1.203527103 1.17041270 2.220554e-01  0.085435869
## L_preSMA_enc_delay       1.298315409 0.16706649 3.147525e+00  0.611457377
## R_dlPFC_enc_delay        9.806998680 0.41955178 2.308963e+00  4.846281996
## R_IPS_enc_delay          0.037926215 2.97320400 2.309658e+00  0.419192598
## R_medPar_enc_delay       0.170792070 0.23243546 2.446574e-01  0.717659665
## L_aMFG_enc_delay_comb    2.781147221 2.70732800 8.644748e+00 12.344086471
## L_dlPFC_enc_delay_comb   1.147237780 2.79152991 4.750068e+00  0.003200887
## L_dMFG_enc_delay_comb   18.748525968 0.49279174 5.964350e-01  2.358335515
## L_IPS_enc_delay_comb     0.495395826 9.26969728 4.873806e-01 14.038046019
## L_preSMA_enc_delay_comb  0.748446793 3.99523439 1.681383e+00  0.114804981
## R_dlPFC_enc_delay_comb   0.040257299 2.96359488 3.492246e+00  4.164688776
## R_IPS_enc_delay_comb     0.294561186 8.98878587 1.892305e-01  0.073363271
## R_medPar_enc_delay_comb  0.181018076 5.64562180 4.786925e+00  0.385338484
##                               Dim.29       Dim.30      Dim.31       Dim.32
## L_aMFG_enc               0.000000000  0.000000000  0.00000000 5.575459e+01
## L_aMFG_delay             0.607323965  0.191066512  0.09030963 1.985102e+01
## L_dlPFC_enc              1.135842969  0.052151798  1.69366312 1.509929e-29
## L_dlPFC_delay            0.002972700  2.682941297  0.05491458 1.733337e-29
## L_dMFG_enc               1.733690222  2.814161857  7.78708563 2.773339e-30
## L_dMFG_delay             0.003176588  0.860495937  0.75413546 5.825938e-31
## L_IPS_enc                1.478894744  0.242733888  0.20655392 7.703720e-32
## L_IPS_delay              0.560265866  0.007395033  0.52462694 5.565938e-30
## L_preSMA_enc             0.585337737  0.888859195 14.64566253 7.703720e-30
## L_preSMA_delay           0.777995715  0.035051910  0.43879297 4.814825e-31
## R_dlPFC_enc              0.103381419  0.555458598  0.29248486 2.773339e-30
## R_dlPFC_delay            1.703900563  0.246202225  0.08213504 7.703720e-32
## R_IPS_enc               10.855374407  4.349466908  2.45075607 1.733337e-31
## R_IPS_delay             10.917544655  1.377782684  0.18275360 6.933348e-31
## R_medPar_enc             9.246251938  5.666422598  1.09002318 7.703720e-32
## R_medPar_delay           3.819277247  0.608500478  0.17082048 4.814825e-31
## L_aMFG_enc_delay         2.370653129  0.745816814  0.35251829 3.592357e+00
## L_dlPFC_enc_delay        1.126393241 10.163483803  2.70048407 1.733337e-31
## L_dMFG_enc_delay         2.074326159  0.010160947  1.29743931 7.703720e-32
## L_IPS_enc_delay          0.127546844  0.277513508  0.81075161 9.437057e-31
## L_preSMA_enc_delay       6.834700072  0.183471999  3.81245257 5.565938e-30
## R_dlPFC_enc_delay        5.662655284  2.823948419  0.01038084 3.081488e-31
## R_IPS_enc_delay          9.466287105 13.767595270  3.99699618 4.814825e-31
## R_medPar_enc_delay       0.856045009  0.379466243  0.02043730 1.925930e-30
## L_aMFG_enc_delay_comb    1.963155762  0.617616537  0.29192306 2.080203e+01
## L_dlPFC_enc_delay_comb   3.627385745  8.000892670  7.04818039 2.773339e-30
## L_dMFG_enc_delay_comb    5.550419715  1.838702280 11.33328261 7.703720e-32
## L_IPS_enc_delay_comb     0.336711678  0.828796839  0.30740963 2.773339e-30
## L_preSMA_enc_delay_comb 10.027796420  1.482951552 26.50862600 0.000000e+00
## R_dlPFC_enc_delay_comb   3.875633673  4.878008064  0.12909986 9.321501e-30
## R_IPS_enc_delay_comb     0.172381653 27.297347958  9.98286280 3.081488e-31
## R_medPar_enc_delay_comb  2.396677777  6.125536180  0.93243749 1.925930e-30
# Contributions of variables to PC1
fviz_contrib(res.pca, choice = "var", axes = 1, top = 15)

# Contributions of variables to PC2
fviz_contrib(res.pca, choice = "var", axes = 2, top = 10)

# Contributions of variables to PC3
fviz_contrib(res.pca, choice = "var", axes = 3, top = 10)

fviz_pca_var(res.pca,
             col.var = "contrib", # Color by contributions to the PC
             gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
             repel = TRUE     # Avoid text overlapping
)

Similarity measures

We’re going to the same thing for the similarity measures, since we have the same issue (though not quite as badly).

We cover 78% of the variance by PC5, so we’ll focus on those.

PC 1: mostly related to within TR high load correct trials (regardless of area) and across TR similarity at high load in the fusiform

  • similarity of high load correct trials to a correct template at encoding in DFR
  • similarity of high load correct trials to a correct template at delay in the fusiform
  • similarity of high load correct trials in the fusiform at encoding
  • similarity of high load incorrect trials to a correct template at encoding in DFR
  • similarity of low load correct trials in the fusiform at delay
  • individual trial encoding similarity to correct template delay period at high load correct trials in the fusiform
  • correct template encoding similarity to individual trial delay period at high load correct trials in the fusiform
  • template encoding to template delay in the fusiform ROI

PC 2: similarity within TR in low load correct trials in DFR, individual to template across TR in high load correct in fusiform

  • similarity of high load incorrect trials in the DFR at delay
  • similarity of low load correct trials in the DFR at delay
  • similarity of low load correct trials in the DFR at encoding
  • correct template encoding similarity to individual trial delay period at high load correct trials in the fusiform
  • individual trial encoding similarity to correct template delay period at high load correct trials in the fusiform
  • template encoding to template delay in the fusiform ROI

PC 3: fusiform similarity during encoding (regardless of accuracy), delay similarity in DFR

  • similarity of high load incorrect trials in the fusiform during encoding
  • similarity of high load correct trials in fusiform during encoding
  • similarity of low load correct trials in fusiform during encoding
  • similarity of high load incorrect trials during delay in the DFR
  • similarity of low load correct trials during delay in the DFR

PC 4: how similar high load incorrect trials are to the template correct trials and low load correct trials in fusiform

  • similarity of high load incorrect trials during delay in the DFR
  • similarity of high load incorrect trials in the fusiform during delay
  • similarity of high load incorrect trials during encoding in the DFR
  • similarity of low load correct trials in encoding in DFR
  • similarity of low load correct trials during delay in DFR

PC 5: mostly related to correct trials (regardless of load) in fusiform

  • similarity of high load incorrect trials in the fusiform during delay
  • similarity of high load correct trials in the fusiform during delay
  • similarity of high load correct trials in the DFR during encoding
  • similarity of low load correct trials in the fusiform during delay
  • similarity of low load correct trials in the fusiform during encoding
  • template encoding to template delay in the fusiform ROI
res_sim.pca <- prcomp(data_for_reg[,c(31:48)], scale = TRUE)
fviz_eig(res_sim.pca)

summary(res_sim.pca)
## Importance of components:
##                           PC1    PC2     PC3    PC4     PC5     PC6     PC7
## Standard deviation     2.7137 1.9660 1.17157 1.0314 0.96550 0.78670 0.69463
## Proportion of Variance 0.4091 0.2147 0.07625 0.0591 0.05179 0.03438 0.02681
## Cumulative Proportion  0.4091 0.6239 0.70011 0.7592 0.81100 0.84539 0.87219
##                            PC8     PC9    PC10    PC11    PC12    PC13    PC14
## Standard deviation     0.63943 0.58355 0.57136 0.52755 0.50901 0.47112 0.38700
## Proportion of Variance 0.02271 0.01892 0.01814 0.01546 0.01439 0.01233 0.00832
## Cumulative Proportion  0.89491 0.91383 0.93196 0.94742 0.96182 0.97415 0.98247
##                           PC15    PC16    PC17    PC18
## Standard deviation     0.35572 0.32075 0.27761 0.09529
## Proportion of Variance 0.00703 0.00572 0.00428 0.00050
## Cumulative Proportion  0.98950 0.99521 0.99950 1.00000
res_sim.var <- get_pca_var(res_sim.pca)
res_sim.var$contrib      # Contributions to the PCs
##                                          Dim.1    Dim.2       Dim.3       Dim.4
## L_dlPFC_enc_delay_comb                6.918623 5.480412  1.41447237 11.00358811
## L_dMFG_enc_delay_comb                 6.273713 4.350938  1.17159880  6.33267954
## L_IPS_enc_delay_comb                  6.096469 7.967627  0.20029076  3.96465303
## L_preSMA_enc_delay_comb               6.686211 4.873785  1.79377045 11.67198387
## R_dlPFC_enc_delay_comb                7.629073 4.646966  0.45667515  4.69679365
## R_IPS_enc_delay_comb                  5.996474 7.056570  2.29757771 10.99823360
## R_medPar_enc_delay_comb               5.265801 2.642132  8.25964094 21.87120937
## R_all_delay_enc_delay_comb            9.256676 7.798231  0.07571221  0.09364537
## high_corr_fus_enc                     6.094995 3.852201 10.18190861  9.39817483
## high_corr_fus_delay                   4.609297 7.348209  0.06477430  1.78084606
## high_incorr_fus_enc                   3.463601 4.748518 14.89518607  2.96188398
## high_incorr_fus_del                   2.264186 4.221773  1.27383154  0.64588340
## low_corr_fus_enc                      2.843233 5.440746 25.08951936  0.01029436
## low_corr_fus_del                      4.715895 8.017147  0.21085651  0.77541801
## correct_encoding_to_correct_delay_fus 4.365219 6.293588  7.56091565  3.49542573
## correct_enc_to_delay_fus_high_corr    4.583100 7.206993 16.06765633  2.75853442
## enc_to_correct_delay_fus_high_corr    6.189247 5.881304  8.21931577  0.04772051
## high_corr_DFR_enc                     6.748187 2.172860  0.76629748  7.49303217
##                                            Dim.5       Dim.6        Dim.7
## L_dlPFC_enc_delay_comb                 0.2085356  0.01386202 1.493229e+00
## L_dMFG_enc_delay_comb                  1.3480550  0.01548475 1.291436e-01
## L_IPS_enc_delay_comb                   0.1599291  0.18277789 9.965150e+00
## L_preSMA_enc_delay_comb                0.5923387  0.59812404 1.260117e+00
## R_dlPFC_enc_delay_comb                 0.1851407  0.01036687 6.962444e-01
## R_IPS_enc_delay_comb                   1.6078286  0.12547225 1.044868e+01
## R_medPar_enc_delay_comb                0.6583775  0.41550657 4.592828e+00
## R_all_delay_enc_delay_comb             0.1197864  0.02926260 3.841576e-01
## high_corr_fus_enc                      2.5215321  0.15023831 3.868029e-01
## high_corr_fus_delay                   13.6974956 18.03835425 9.455616e-01
## high_incorr_fus_enc                    4.8843943 14.65712365 1.190280e+01
## high_incorr_fus_del                   33.2262992 49.69695979 5.979452e-01
## low_corr_fus_enc                       0.1392294  4.75584405 1.405305e-04
## low_corr_fus_del                       9.7206117  4.75235522 1.184072e+01
## correct_encoding_to_correct_delay_fus 19.0945668  3.40601534 7.845392e-02
## correct_enc_to_delay_fus_high_corr     1.3384667  2.84378164 1.680355e-01
## enc_to_correct_delay_fus_high_corr    10.3215390  0.24836452 1.772019e-01
## high_corr_DFR_enc                      0.1758735  0.06010625 4.493279e+01
##                                              Dim.8       Dim.9       Dim.10
## L_dlPFC_enc_delay_comb                 0.015206735  7.61223592  0.008173188
## L_dMFG_enc_delay_comb                 31.875125302 24.87865430  3.920321457
## L_IPS_enc_delay_comb                   2.412054492  0.46043228 20.409576126
## L_preSMA_enc_delay_comb                0.010421251  0.57932753  3.887309020
## R_dlPFC_enc_delay_comb                10.787609307  2.18526879 10.153171840
## R_IPS_enc_delay_comb                   0.722548962  0.03790630  0.279153975
## R_medPar_enc_delay_comb                1.537794489  9.97326675  5.219164756
## R_all_delay_enc_delay_comb             0.268227072  0.02520042  0.116667059
## high_corr_fus_enc                      0.301924251  0.06851873  2.832955843
## high_corr_fus_delay                    8.235283821  0.08069533  8.985985154
## high_incorr_fus_enc                   14.812247708  2.91581725  0.971354020
## high_incorr_fus_del                    0.990291315  4.20528366  0.188923359
## low_corr_fus_enc                      22.727916855 25.52308636  1.112727274
## low_corr_fus_del                       0.137643174  7.03599510 23.429391268
## correct_encoding_to_correct_delay_fus  2.181387037  0.52908400  0.330916519
## correct_enc_to_delay_fus_high_corr     0.007863228  1.69728478 13.272578018
## enc_to_correct_delay_fus_high_corr     1.636492932  0.39220878  2.776128948
## high_corr_DFR_enc                      1.339962068 11.79973371  2.105502177
##                                             Dim.11      Dim.12       Dim.13
## L_dlPFC_enc_delay_comb                8.715112e+00  2.50041427  3.952299127
## L_dMFG_enc_delay_comb                 3.814625e-04 14.61932504  2.318927967
## L_IPS_enc_delay_comb                  1.561125e+00 10.35457704  1.253503103
## L_preSMA_enc_delay_comb               2.588207e+00  1.80760849 50.028876059
## R_dlPFC_enc_delay_comb                1.540546e+01  6.31893924 12.835560242
## R_IPS_enc_delay_comb                  2.662028e+00  2.34880888  0.180467154
## R_medPar_enc_delay_comb               1.516174e-04 19.77140590  5.189198892
## R_all_delay_enc_delay_comb            4.718356e-01  0.20762222  0.224947693
## high_corr_fus_enc                     2.695366e+01  0.09269949  6.391792945
## high_corr_fus_delay                   7.333003e-04  4.76761656  3.450004335
## high_incorr_fus_enc                   8.016745e+00 11.53408090  0.099059686
## high_incorr_fus_del                   1.508422e+00  0.25970123  0.546755116
## low_corr_fus_enc                      1.682253e+00  0.14915870  1.950984418
## low_corr_fus_del                      6.851174e-02  7.16266163 10.403707568
## correct_encoding_to_correct_delay_fus 9.089736e+00  1.76409454  0.001123374
## correct_enc_to_delay_fus_high_corr    1.870442e-01  2.60453552  0.818908730
## enc_to_correct_delay_fus_high_corr    1.403616e+01  0.03868600  0.051565892
## high_corr_DFR_enc                     7.052436e+00 13.69806437  0.302317699
##                                            Dim.14       Dim.15      Dim.16
## L_dlPFC_enc_delay_comb                31.64783824  9.943012465  5.86598254
## L_dMFG_enc_delay_comb                  0.01202585  1.423926342  0.23574437
## L_IPS_enc_delay_comb                   3.89871366  2.221367488 22.57880242
## L_preSMA_enc_delay_comb                9.08884435  0.087014431  3.57194324
## R_dlPFC_enc_delay_comb                 7.07047136  9.385721690  0.62795798
## R_IPS_enc_delay_comb                   4.97227312  4.501286550 34.59705431
## R_medPar_enc_delay_comb                0.04555327  0.752927547 11.12864503
## R_all_delay_enc_delay_comb             0.03993065  0.027691649  0.12268747
## high_corr_fus_enc                     16.03962835  0.968417567  1.12880975
## high_corr_fus_delay                    4.67411473  8.129302510  2.05730364
## high_incorr_fus_enc                    2.27008353  1.579542644  0.24153868
## high_incorr_fus_del                    0.19117346  0.005941106  0.16712811
## low_corr_fus_enc                       7.63250731  0.002761028  0.31269098
## low_corr_fus_del                       0.01340532  1.191104536  7.92739732
## correct_encoding_to_correct_delay_fus  3.50505208 36.202696286  2.02547441
## correct_enc_to_delay_fus_high_corr     0.98120302 17.034477631  0.07474867
## enc_to_correct_delay_fus_high_corr     7.20963604  6.240517906  7.30077644
## high_corr_DFR_enc                      0.70754565  0.302290623  0.03531465
##                                             Dim.17       Dim.18
## L_dlPFC_enc_delay_comb                 1.662969465 1.544035e+00
## L_dMFG_enc_delay_comb                  0.069093333 1.024862e+00
## L_IPS_enc_delay_comb                   4.384493279 1.928458e+00
## L_preSMA_enc_delay_comb                0.027247776 8.468707e-01
## R_dlPFC_enc_delay_comb                 1.482921821 5.425659e+00
## R_IPS_enc_delay_comb                   4.841005631 6.326628e+00
## R_medPar_enc_delay_comb                0.619741276 2.056655e+00
## R_all_delay_enc_delay_comb             0.364783590 8.037294e+01
## high_corr_fus_enc                     12.501638130 1.341019e-01
## high_corr_fus_delay                   13.133682085 7.407353e-04
## high_incorr_fus_enc                    0.044845972 1.179011e-03
## high_incorr_fus_del                    0.005674004 3.828901e-03
## low_corr_fus_enc                       0.624108664 2.798553e-03
## low_corr_fus_del                       2.595246884 1.935584e-03
## correct_encoding_to_correct_delay_fus  0.050035684 2.621572e-02
## correct_enc_to_delay_fus_high_corr    28.311900467 4.288751e-02
## enc_to_correct_delay_fus_high_corr    29.015591819 2.175448e-01
## high_corr_DFR_enc                      0.265020119 4.266461e-02
# Contributions of variables to PC1
fviz_contrib(res_sim.pca, choice = "var", axes = 1, top = 10)

# Contributions of variables to PC2
fviz_contrib(res_sim.pca, choice = "var", axes = 2, top = 10)

# Contributions of variables to PC3
fviz_contrib(res_sim.pca, choice = "var", axes = 3, top = 10)

# Contributions of variables to PC4
fviz_contrib(res_sim.pca, choice = "var", axes = 4, top = 10)

# Contributions of variables to PC5
fviz_contrib(res_sim.pca, choice = "var", axes = 5, top = 10)

fviz_pca_var(res_sim.pca,
             col.var = "contrib", # Color by contributions to the PC
             gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
             repel = TRUE     # Avoid text overlapping
)

MVPA

Now, let’s do the same for the MVPA measures.

  • PC1: fusiform during encoding/probe for both template and indiv trials
  • PC2: DFR encoding and delay for mostly indiv trials
  • PC3: DFR encoding and probe (mostly averages from template)
  • PC4: fusiform delay and probe, mostly indiv trials
  • PC5: fusiform, averages from template, all trial types, mostly delay and encoding
  • PC6: template averages for high load trials
  • PC7: high incorrect and low correct in fusiform across trial, mostly in individual trials
  • PC8: low correct trials, particularly for DFR
  • PC9: incorrect high load trials across region, mostly in probe and encoding
  • PC10: low correct and high incorrect in fusiform averages from template
  • PC11: all trial types, mostly geared towards DFR (regardless of individual or template) during probe and delay
  • PC12: loads really strongly on the template average on low correct trials from the delay period in the fusiform, but otherwise, tends to lean towards delay period, from the DFR, low correct trials
res_MVPA.pca <- prcomp(data_for_reg[,c(57:92)], scale = TRUE)
fviz_eig(res_MVPA.pca)

summary(res_MVPA.pca)
## Importance of components:
##                           PC1    PC2     PC3     PC4     PC5     PC6     PC7
## Standard deviation     2.1733 1.9754 1.88085 1.69900 1.61812 1.50461 1.17208
## Proportion of Variance 0.1312 0.1084 0.09827 0.08018 0.07273 0.06289 0.03816
## Cumulative Proportion  0.1312 0.2396 0.33785 0.41804 0.49077 0.55365 0.59181
##                            PC8     PC9   PC10    PC11    PC12    PC13    PC14
## Standard deviation     1.14686 1.12981 0.9859 0.97778 0.91642 0.87732 0.85316
## Proportion of Variance 0.03654 0.03546 0.0270 0.02656 0.02333 0.02138 0.02022
## Cumulative Proportion  0.62835 0.66381 0.6908 0.71736 0.74069 0.76207 0.78229
##                           PC15   PC16    PC17    PC18    PC19    PC20    PC21
## Standard deviation     0.81320 0.8027 0.77550 0.75619 0.73849 0.70641 0.70461
## Proportion of Variance 0.01837 0.0179 0.01671 0.01588 0.01515 0.01386 0.01379
## Cumulative Proportion  0.80066 0.8186 0.83526 0.85115 0.86630 0.88016 0.89395
##                           PC22    PC23    PC24    PC25    PC26    PC27    PC28
## Standard deviation     0.67451 0.64717 0.63189 0.59873 0.57657 0.53769 0.52688
## Proportion of Variance 0.01264 0.01163 0.01109 0.00996 0.00923 0.00803 0.00771
## Cumulative Proportion  0.90659 0.91822 0.92931 0.93927 0.94850 0.95654 0.96425
##                           PC29    PC30   PC31    PC32    PC33    PC34    PC35
## Standard deviation     0.51823 0.44246 0.4155 0.40917 0.38482 0.36243 0.33344
## Proportion of Variance 0.00746 0.00544 0.0048 0.00465 0.00411 0.00365 0.00309
## Cumulative Proportion  0.97171 0.97714 0.9819 0.98659 0.99070 0.99435 0.99744
##                           PC36
## Standard deviation     0.30350
## Proportion of Variance 0.00256
## Cumulative Proportion  1.00000
res_MVPA.var <- get_pca_var(res_MVPA.pca)
#res_MVPA.var$contrib      # Contributions to the PCs

# Contributions of variables to PC1
fviz_contrib(res_MVPA.pca, choice = "var", axes = 1, top = 10)

# Contributions of variables to PC2
fviz_contrib(res_MVPA.pca, choice = "var", axes = 2, top = 10)

# Contributions of variables to PC3
fviz_contrib(res_MVPA.pca, choice = "var", axes = 3, top = 10)

# Contributions of variables to PC4
fviz_contrib(res_MVPA.pca, choice = "var", axes = 4, top = 10)

# Contributions of variables to PC5
fviz_contrib(res_MVPA.pca, choice = "var", axes = 5, top = 10)

# Contributions of variables to PC6
fviz_contrib(res_MVPA.pca, choice = "var", axes = 6, top = 10)

# Contributions of variables to PC7
fviz_contrib(res_MVPA.pca, choice = "var", axes = 7, top = 10)

# Contributions of variables to PC8
fviz_contrib(res_MVPA.pca, choice = "var", axes = 8, top = 10)

# Contributions of variables to PC9
fviz_contrib(res_MVPA.pca, choice = "var", axes = 9, top = 10)

# Contributions of variables to PC10
fviz_contrib(res_MVPA.pca, choice = "var", axes = 10, top = 10)

# Contributions of variables to PC11
fviz_contrib(res_MVPA.pca, choice = "var", axes = 11, top = 10)

# Contributions of variables to PC12
fviz_contrib(res_MVPA.pca, choice = "var", axes = 12, top = 10)

fviz_pca_var(res_MVPA.pca,
             col.var = "contrib", # Color by contributions to the PC
             gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
             repel = TRUE     # Avoid text overlapping
)

Predicting Span

Now that we’ve got our PCs, we’re going to use them to try to predict span.

Only Univariate

It seems like it’s actually just including both the encoding and the delay that relates to span, because it’s the first PC that relates.

data_reg_span <- data.frame(span = data_for_reg$span, PC1 = res.pca[["x"]][,1], PC2 = res.pca[["x"]][,2],PC3 = res.pca[["x"]][,3] )
span_univ.lm <- lm(span ~ .,data=data_reg_span)
summary(span_univ.lm)
## 
## Call:
## lm(formula = span ~ ., data = data_reg_span)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.41584 -0.32092  0.00616  0.34102  1.34836 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.065169   0.040361   1.615 0.108283    
## PC1          0.036908   0.010679   3.456 0.000696 ***
## PC2          0.006689   0.014399   0.465 0.642862    
## PC3         -0.026539   0.024524  -1.082 0.280759    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5262 on 166 degrees of freedom
## Multiple R-squared:  0.07435,    Adjusted R-squared:  0.05762 
## F-statistic: 4.444 on 3 and 166 DF,  p-value: 0.004944
step_univ_span <- stepAIC(span_univ.lm)
## Start:  AIC=-214.32
## span ~ PC1 + PC2 + PC3
## 
##        Df Sum of Sq    RSS     AIC
## - PC2   1    0.0598 46.031 -216.10
## - PC3   1    0.3243 46.295 -215.13
## <none>              45.971 -214.32
## - PC1   1    3.3082 49.279 -204.51
## 
## Step:  AIC=-216.1
## span ~ PC1 + PC3
## 
##        Df Sum of Sq    RSS     AIC
## - PC3   1    0.3243 46.355 -216.91
## <none>              46.031 -216.10
## - PC1   1    3.3082 49.339 -206.31
## 
## Step:  AIC=-216.91
## span ~ PC1
## 
##        Df Sum of Sq    RSS     AIC
## <none>              46.355 -216.91
## - PC1   1    3.3082 49.663 -207.19
summary(step_univ_span)
## 
## Call:
## lm(formula = span ~ PC1, data = data_reg_span)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.39274 -0.31849 -0.00627  0.35046  1.40176 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.06517    0.04029   1.618 0.107621    
## PC1          0.03691    0.01066   3.463 0.000679 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5253 on 168 degrees of freedom
## Multiple R-squared:  0.06661,    Adjusted R-squared:  0.06106 
## F-statistic: 11.99 on 1 and 168 DF,  p-value: 0.0006787

Add similarity

We can add in similarity measures and they have a significant relation with span.

data_reg3 <- data.frame(data_reg_span[,1:4],res_sim.pca[["x"]][,1:5])
colnames(data_reg3)[2:4] <-  paste(colnames(data_reg3)[2:4],"_univariate", sep="")
colnames(data_reg3)[5:9] <- paste(colnames(data_reg3)[5:9],"_similarity", sep="")

univariate_similarity_pca.lm <- lm(span ~ ., data = data_reg3)
summary(univariate_similarity_pca.lm)
## 
## Call:
## lm(formula = span ~ ., data = data_reg3)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.27187 -0.35891  0.04929  0.29405  1.52440 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       0.06517    0.04004   1.628   0.1056  
## PC1_univariate   -0.21522    0.15231  -1.413   0.1596  
## PC2_univariate   -0.06182    0.03707  -1.668   0.0973 .
## PC3_univariate   -0.08737    0.09766  -0.895   0.3723  
## PC1.1_similarity -0.30636    0.18071  -1.695   0.0920 .
## PC2.1_similarity  0.24822    0.16686   1.488   0.1388  
## PC3.1_similarity -0.03927    0.06685  -0.587   0.5578  
## PC4_similarity    0.19191    0.12692   1.512   0.1325  
## PC5_similarity    0.05052    0.04669   1.082   0.2809  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5221 on 161 degrees of freedom
## Multiple R-squared:  0.1165, Adjusted R-squared:  0.07257 
## F-statistic: 2.653 on 8 and 161 DF,  p-value: 0.009249
step_model_univ_sim <- stepAIC(univariate_similarity_pca.lm)
## Start:  AIC=-212.24
## span ~ PC1_univariate + PC2_univariate + PC3_univariate + PC1.1_similarity + 
##     PC2.1_similarity + PC3.1_similarity + PC4_similarity + PC5_similarity
## 
##                    Df Sum of Sq    RSS     AIC
## - PC3.1_similarity  1   0.09403 43.973 -213.88
## - PC3_univariate    1   0.21815 44.097 -213.40
## - PC5_similarity    1   0.31898 44.198 -213.01
## <none>                          43.879 -212.24
## - PC1_univariate    1   0.54416 44.423 -212.15
## - PC2.1_similarity  1   0.60308 44.482 -211.92
## - PC4_similarity    1   0.62308 44.502 -211.85
## - PC2_univariate    1   0.75821 44.637 -211.33
## - PC1.1_similarity  1   0.78328 44.662 -211.24
## 
## Step:  AIC=-213.88
## span ~ PC1_univariate + PC2_univariate + PC3_univariate + PC1.1_similarity + 
##     PC2.1_similarity + PC4_similarity + PC5_similarity
## 
##                    Df Sum of Sq    RSS     AIC
## - PC3_univariate    1   0.15027 44.123 -215.30
## - PC5_similarity    1   0.23460 44.207 -214.97
## <none>                          43.973 -213.88
## - PC1_univariate    1   0.69471 44.667 -213.21
## - PC2_univariate    1   0.78225 44.755 -212.88
## - PC4_similarity    1   0.78370 44.756 -212.88
## - PC2.1_similarity  1   0.78965 44.762 -212.85
## - PC1.1_similarity  1   0.97838 44.951 -212.14
## 
## Step:  AIC=-215.3
## span ~ PC1_univariate + PC2_univariate + PC1.1_similarity + PC2.1_similarity + 
##     PC4_similarity + PC5_similarity
## 
##                    Df Sum of Sq    RSS     AIC
## - PC5_similarity    1   0.15723 44.280 -216.69
## <none>                          44.123 -215.30
## - PC4_similarity    1   0.68429 44.807 -214.68
## - PC2_univariate    1   1.04370 45.167 -213.32
## - PC1_univariate    1   1.29809 45.421 -212.37
## - PC2.1_similarity  1   1.47284 45.596 -211.72
## - PC1.1_similarity  1   1.73482 45.858 -210.74
## 
## Step:  AIC=-216.69
## span ~ PC1_univariate + PC2_univariate + PC1.1_similarity + PC2.1_similarity + 
##     PC4_similarity
## 
##                    Df Sum of Sq    RSS     AIC
## <none>                          44.280 -216.69
## - PC4_similarity    1   0.69733 44.977 -216.04
## - PC2_univariate    1   1.07070 45.351 -214.63
## - PC1_univariate    1   1.31189 45.592 -213.73
## - PC2.1_similarity  1   1.48851 45.769 -213.07
## - PC1.1_similarity  1   1.75111 46.031 -212.10
summary(step_model_univ_sim)
## 
## Call:
## lm(formula = span ~ PC1_univariate + PC2_univariate + PC1.1_similarity + 
##     PC2.1_similarity + PC4_similarity, data = data_reg3)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.30612 -0.33715  0.04458  0.28936  1.57335 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       0.06517    0.03985   1.635   0.1039  
## PC1_univariate   -0.28834    0.13081  -2.204   0.0289 *
## PC2_univariate   -0.07080    0.03556  -1.991   0.0481 *
## PC1.1_similarity -0.39406    0.15474  -2.547   0.0118 *
## PC2.1_similarity  0.33195    0.14138   2.348   0.0201 *
## PC4_similarity    0.09722    0.06050   1.607   0.1100  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5196 on 164 degrees of freedom
## Multiple R-squared:  0.1084, Adjusted R-squared:  0.0812 
## F-statistic: 3.987 on 5 and 164 DF,  p-value: 0.001935

However, adding in similarity does not necessarily create a better model predicting span.

anova(step_univ_span,step_model_univ_sim)
## Analysis of Variance Table
## 
## Model 1: span ~ PC1
## Model 2: span ~ PC1_univariate + PC2_univariate + PC1.1_similarity + PC2.1_similarity + 
##     PC4_similarity
##   Res.Df    RSS Df Sum of Sq     F Pr(>F)
## 1    168 46.355                          
## 2    164 44.280  4    2.0747 1.921 0.1093

Add MVPA

Let’s see if adding in MVPA makes it better. It does not.

data_reg4 <- data.frame(data_reg_span[,1:4],res_MVPA.pca[["x"]][,1:12])
colnames(data_reg4)[2:4] <-  paste(colnames(data_reg4)[2:4],"_univariate", sep="")
colnames(data_reg4)[5:12] <- paste(colnames(data_reg4)[5:12],"_MVPA", sep="")

univariate_MVPA_pca.lm <- lm(span ~ ., data = data_reg4)
summary(univariate_MVPA_pca.lm)
## 
## Call:
## lm(formula = span ~ ., data = data_reg4)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.36137 -0.31146 -0.02549  0.33836  1.38646 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)   
## (Intercept)     0.065169   0.040497   1.609  0.10961   
## PC1_univariate  0.031189   0.011513   2.709  0.00751 **
## PC2_univariate  0.007578   0.015161   0.500  0.61789   
## PC3_univariate -0.027229   0.025290  -1.077  0.28331   
## PC1.1_MVPA      0.017605   0.018804   0.936  0.35064   
## PC2.1_MVPA     -0.001398   0.021277  -0.066  0.94768   
## PC3.1_MVPA     -0.030606   0.021910  -1.397  0.16445   
## PC4_MVPA       -0.027425   0.024006  -1.142  0.25505   
## PC5_MVPA       -0.031385   0.025541  -1.229  0.22102   
## PC6_MVPA       -0.014226   0.027105  -0.525  0.60045   
## PC7_MVPA       -0.047366   0.034934  -1.356  0.17713   
## PC8_MVPA        0.012503   0.036268   0.345  0.73076   
## PC9             0.024555   0.036367   0.675  0.50056   
## PC10           -0.034394   0.041277  -0.833  0.40600   
## PC11           -0.057074   0.042554  -1.341  0.18183   
## PC12            0.012208   0.044452   0.275  0.78397   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.528 on 154 degrees of freedom
## Multiple R-squared:  0.1355, Adjusted R-squared:  0.05126 
## F-statistic: 1.609 on 15 and 154 DF,  p-value: 0.0771
step_model_univ_MPVA <- stepAIC(univariate_MVPA_pca.lm)
## Start:  AIC=-201.94
## span ~ PC1_univariate + PC2_univariate + PC3_univariate + PC1.1_MVPA + 
##     PC2.1_MVPA + PC3.1_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + 
##     PC7_MVPA + PC8_MVPA + PC9 + PC10 + PC11 + PC12
## 
##                  Df Sum of Sq    RSS     AIC
## - PC2.1_MVPA      1   0.00120 42.936 -203.93
## - PC12            1   0.02103 42.956 -203.85
## - PC8_MVPA        1   0.03313 42.968 -203.81
## - PC2_univariate  1   0.06966 43.005 -203.66
## - PC6_MVPA        1   0.07679 43.012 -203.63
## - PC9             1   0.12710 43.062 -203.44
## - PC10            1   0.19357 43.129 -203.17
## - PC1.1_MVPA      1   0.24436 43.179 -202.97
## - PC3_univariate  1   0.32319 43.258 -202.66
## - PC4_MVPA        1   0.36387 43.299 -202.50
## - PC5_MVPA        1   0.42098 43.356 -202.28
## - PC11            1   0.50152 43.437 -201.96
## <none>                        42.935 -201.94
## - PC7_MVPA        1   0.51254 43.448 -201.92
## - PC3.1_MVPA      1   0.54404 43.479 -201.80
## - PC1_univariate  1   2.04617 44.981 -196.02
## 
## Step:  AIC=-203.93
## span ~ PC1_univariate + PC2_univariate + PC3_univariate + PC1.1_MVPA + 
##     PC3.1_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC9 + PC10 + PC11 + PC12
## 
##                  Df Sum of Sq    RSS     AIC
## - PC12            1   0.02106 42.957 -205.85
## - PC8_MVPA        1   0.03279 42.969 -205.80
## - PC2_univariate  1   0.07020 43.007 -205.66
## - PC6_MVPA        1   0.07648 43.013 -205.63
## - PC9             1   0.12799 43.064 -205.43
## - PC10            1   0.19378 43.130 -205.17
## - PC1.1_MVPA      1   0.24446 43.181 -204.97
## - PC3_univariate  1   0.33729 43.274 -204.60
## - PC4_MVPA        1   0.36389 43.300 -204.50
## - PC5_MVPA        1   0.42133 43.358 -204.27
## - PC11            1   0.50032 43.437 -203.96
## <none>                        42.936 -203.93
## - PC7_MVPA        1   0.51182 43.448 -203.92
## - PC3.1_MVPA      1   0.54303 43.479 -203.80
## - PC1_univariate  1   2.16192 45.098 -197.58
## 
## Step:  AIC=-205.85
## span ~ PC1_univariate + PC2_univariate + PC3_univariate + PC1.1_MVPA + 
##     PC3.1_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC9 + PC10 + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC8_MVPA        1   0.03341 42.991 -207.72
## - PC2_univariate  1   0.07595 43.033 -207.55
## - PC6_MVPA        1   0.07632 43.034 -207.55
## - PC9             1   0.12779 43.085 -207.34
## - PC10            1   0.19340 43.151 -207.09
## - PC1.1_MVPA      1   0.24357 43.201 -206.89
## - PC3_univariate  1   0.33179 43.289 -206.54
## - PC4_MVPA        1   0.36358 43.321 -206.42
## - PC5_MVPA        1   0.42376 43.381 -206.18
## - PC11            1   0.50268 43.460 -205.87
## <none>                        42.957 -205.85
## - PC7_MVPA        1   0.51049 43.468 -205.84
## - PC3.1_MVPA      1   0.54171 43.499 -205.72
## - PC1_univariate  1   2.16182 45.119 -199.50
## 
## Step:  AIC=-207.72
## span ~ PC1_univariate + PC2_univariate + PC3_univariate + PC1.1_MVPA + 
##     PC3.1_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + 
##     PC9 + PC10 + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC2_univariate  1   0.06231 43.053 -209.47
## - PC6_MVPA        1   0.07555 43.066 -209.42
## - PC9             1   0.13115 43.122 -209.20
## - PC10            1   0.19375 43.185 -208.95
## - PC1.1_MVPA      1   0.24752 43.238 -208.74
## - PC3_univariate  1   0.33857 43.329 -208.38
## - PC4_MVPA        1   0.36201 43.353 -208.29
## - PC5_MVPA        1   0.41741 43.408 -208.08
## - PC11            1   0.49353 43.484 -207.78
## <none>                        42.991 -207.72
## - PC7_MVPA        1   0.51056 43.501 -207.71
## - PC3.1_MVPA      1   0.53956 43.530 -207.60
## - PC1_univariate  1   2.28570 45.276 -200.91
## 
## Step:  AIC=-209.47
## span ~ PC1_univariate + PC3_univariate + PC1.1_MVPA + PC3.1_MVPA + 
##     PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + PC9 + PC10 + 
##     PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC6_MVPA        1   0.07921 43.132 -211.16
## - PC9             1   0.13595 43.189 -210.94
## - PC10            1   0.19668 43.250 -210.70
## - PC1.1_MVPA      1   0.27547 43.329 -210.39
## - PC3_univariate  1   0.34296 43.396 -210.12
## - PC4_MVPA        1   0.35888 43.412 -210.06
## - PC5_MVPA        1   0.37314 43.426 -210.00
## - PC11            1   0.46455 43.518 -209.65
## <none>                        43.053 -209.47
## - PC7_MVPA        1   0.54266 43.596 -209.34
## - PC3.1_MVPA      1   0.56993 43.623 -209.24
## - PC1_univariate  1   2.28537 45.338 -202.68
## 
## Step:  AIC=-211.16
## span ~ PC1_univariate + PC3_univariate + PC1.1_MVPA + PC3.1_MVPA + 
##     PC4_MVPA + PC5_MVPA + PC7_MVPA + PC9 + PC10 + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC9             1   0.13847 43.271 -212.62
## - PC10            1   0.19632 43.329 -212.39
## - PC1.1_MVPA      1   0.27650 43.409 -212.07
## - PC3_univariate  1   0.34012 43.472 -211.82
## - PC4_MVPA        1   0.35720 43.490 -211.76
## - PC5_MVPA        1   0.37333 43.506 -211.69
## - PC11            1   0.46077 43.593 -211.35
## <none>                        43.132 -211.16
## - PC7_MVPA        1   0.53937 43.672 -211.05
## - PC3.1_MVPA      1   0.56472 43.697 -210.95
## - PC1_univariate  1   2.37382 45.506 -204.05
## 
## Step:  AIC=-212.61
## span ~ PC1_univariate + PC3_univariate + PC1.1_MVPA + PC3.1_MVPA + 
##     PC4_MVPA + PC5_MVPA + PC7_MVPA + PC10 + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC10            1   0.19675 43.468 -213.84
## - PC1.1_MVPA      1   0.27433 43.545 -213.54
## - PC3_univariate  1   0.33814 43.609 -213.29
## - PC4_MVPA        1   0.36039 43.631 -213.20
## - PC5_MVPA        1   0.37285 43.644 -213.16
## - PC11            1   0.47086 43.742 -212.78
## <none>                        43.271 -212.62
## - PC7_MVPA        1   0.54665 43.817 -212.48
## - PC3.1_MVPA      1   0.57657 43.847 -212.36
## - PC1_univariate  1   2.25887 45.530 -205.96
## 
## Step:  AIC=-213.84
## span ~ PC1_univariate + PC3_univariate + PC1.1_MVPA + PC3.1_MVPA + 
##     PC4_MVPA + PC5_MVPA + PC7_MVPA + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC1.1_MVPA      1   0.27503 43.743 -214.77
## - PC3_univariate  1   0.30944 43.777 -214.64
## - PC4_MVPA        1   0.35780 43.825 -214.45
## - PC5_MVPA        1   0.37270 43.840 -214.39
## - PC11            1   0.47468 43.942 -214.00
## <none>                        43.468 -213.84
## - PC7_MVPA        1   0.54489 44.012 -213.72
## - PC3.1_MVPA      1   0.57420 44.042 -213.61
## - PC1_univariate  1   2.27342 45.741 -207.18
## 
## Step:  AIC=-214.77
## span ~ PC1_univariate + PC3_univariate + PC3.1_MVPA + PC4_MVPA + 
##     PC5_MVPA + PC7_MVPA + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC3_univariate  1   0.32025 44.063 -215.53
## - PC4_MVPA        1   0.35991 44.102 -215.38
## - PC5_MVPA        1   0.37260 44.115 -215.33
## - PC11            1   0.47668 44.219 -214.93
## <none>                        43.743 -214.77
## - PC7_MVPA        1   0.54808 44.291 -214.65
## - PC3.1_MVPA      1   0.57918 44.322 -214.53
## - PC1_univariate  1   2.21555 45.958 -208.37
## 
## Step:  AIC=-215.53
## span ~ PC1_univariate + PC3.1_MVPA + PC4_MVPA + PC5_MVPA + PC7_MVPA + 
##     PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC4_MVPA        1   0.31357 44.376 -216.32
## - PC5_MVPA        1   0.36849 44.431 -216.12
## <none>                        44.063 -215.53
## - PC7_MVPA        1   0.52503 44.588 -215.52
## - PC3.1_MVPA      1   0.55197 44.615 -215.41
## - PC11            1   0.59370 44.657 -215.26
## - PC1_univariate  1   2.20534 46.268 -209.23
## 
## Step:  AIC=-216.33
## span ~ PC1_univariate + PC3.1_MVPA + PC5_MVPA + PC7_MVPA + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC5_MVPA        1   0.36874 44.745 -216.92
## - PC7_MVPA        1   0.52120 44.898 -216.34
## <none>                        44.376 -216.32
## - PC3.1_MVPA      1   0.54582 44.922 -216.25
## - PC11            1   0.58785 44.964 -216.09
## - PC1_univariate  1   2.29842 46.675 -209.74
## 
## Step:  AIC=-216.92
## span ~ PC1_univariate + PC3.1_MVPA + PC7_MVPA + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC7_MVPA        1   0.52177 45.267 -216.95
## <none>                        44.745 -216.92
## - PC3.1_MVPA      1   0.54673 45.292 -216.85
## - PC11            1   0.58871 45.334 -216.70
## - PC1_univariate  1   2.28555 47.031 -210.45
## 
## Step:  AIC=-216.95
## span ~ PC1_univariate + PC3.1_MVPA + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## - PC3.1_MVPA      1   0.53287 45.800 -216.96
## <none>                        45.267 -216.95
## - PC11            1   0.57550 45.842 -216.80
## - PC1_univariate  1   2.51081 47.778 -209.77
## 
## Step:  AIC=-216.96
## span ~ PC1_univariate + PC11
## 
##                  Df Sum of Sq    RSS     AIC
## <none>                        45.800 -216.96
## - PC11            1   0.55508 46.355 -216.91
## - PC1_univariate  1   2.91242 48.712 -208.48
summary(step_model_univ_MPVA)
## 
## Call:
## lm(formula = span ~ PC1_univariate + PC11, data = data_reg4)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.34982 -0.34159 -0.02472  0.37419  1.41833 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)   
## (Intercept)     0.06517    0.04017   1.623  0.10657   
## PC1_univariate  0.03493    0.01072   3.259  0.00136 **
## PC11           -0.05911    0.04155  -1.423  0.15670   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5237 on 167 degrees of freedom
## Multiple R-squared:  0.07779,    Adjusted R-squared:  0.06674 
## F-statistic: 7.043 on 2 and 167 DF,  p-value: 0.001157

Predicting BPRS

Only Univariate

The univariate data does not predict BPRS.

data_reg5 <- data.frame(BPRS = data_for_reg$BPRS,PC1_univ = res.pca[["x"]][,1], PC2_univ = res.pca[["x"]][,2], 
                        PC3_univ=res.pca[["x"]][,3])

full_BPRS_univ.lm <- lm(BPRS ~ ., data=data_reg5)
summary(full_BPRS_univ.lm)
## 
## Call:
## lm(formula = BPRS ~ ., data = data_reg5)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5302 -0.6423 -0.1754  0.4693  4.8139 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.02961    0.07567  -0.391    0.696
## PC1_univ    -0.01798    0.02002  -0.898    0.370
## PC2_univ     0.02161    0.02700   0.800    0.425
## PC3_univ     0.06762    0.04598   1.471    0.143
## 
## Residual standard error: 0.9867 on 166 degrees of freedom
## Multiple R-squared:  0.02129,    Adjusted R-squared:  0.003598 
## F-statistic: 1.203 on 3 and 166 DF,  p-value: 0.3103
step_BPRS_univ <- stepAIC(full_BPRS_univ.lm)
## Start:  AIC=-0.61
## BPRS ~ PC1_univ + PC2_univ + PC3_univ
## 
##            Df Sum of Sq    RSS      AIC
## - PC2_univ  1   0.62379 162.23 -1.95515
## - PC1_univ  1   0.78533 162.39 -1.78595
## <none>                  161.60 -0.61008
## - PC3_univ  1   2.10548 163.71 -0.40951
## 
## Step:  AIC=-1.96
## BPRS ~ PC1_univ + PC3_univ
## 
##            Df Sum of Sq    RSS     AIC
## - PC1_univ  1   0.78533 163.01 -3.1342
## <none>                  162.23 -1.9551
## - PC3_univ  1   2.10548 164.33 -1.7630
## 
## Step:  AIC=-3.13
## BPRS ~ PC3_univ
## 
##            Df Sum of Sq    RSS     AIC
## <none>                  163.01 -3.1342
## - PC3_univ  1    2.1055 165.12 -2.9525
summary(step_BPRS_univ)
## 
## Call:
## lm(formula = BPRS ~ PC3_univ, data = data_reg5)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4936 -0.6162 -0.1898  0.4098  4.9252 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.02961    0.07555  -0.392    0.696
## PC3_univ     0.06762    0.04591   1.473    0.143
## 
## Residual standard error: 0.985 on 168 degrees of freedom
## Multiple R-squared:  0.01275,    Adjusted R-squared:  0.006875 
## F-statistic:  2.17 on 1 and 168 DF,  p-value: 0.1426

Only Similarity

Now, let’s try with similarity. These are able to predict BPRS! We’re focusing on PC2 (similarity within TR in low load correct trials in DFR, individual to template across TR in high load correct in fusiform), with PCs 1 (mostly related to within TR high load correct trials (regardless of area) and across TR similarity at high load in the fusiform) and 5 (mostly related to correct trials (regardless of load) in fusiform) trending towards significance.

data_reg6 <- data.frame(BPRS = data_for_reg$BPRS,  PC3_univ=res.pca[["x"]][,3], res_sim.pca[["x"]][,1:5]) 

full_sim_BPRS.lm <- lm(BPRS ~.,data=data_reg6)
summary(full_sim_BPRS.lm)
## 
## Call:
## lm(formula = BPRS ~ ., data = data_reg6)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7965 -0.6758 -0.1521  0.4328  4.6450 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -0.02961    0.07363  -0.402   0.6882  
## PC3_univ    -0.06685    0.14036  -0.476   0.6345  
## PC1          0.05031    0.02746   1.832   0.0688 .
## PC2          0.04019    0.03954   1.016   0.3109  
## PC3         -0.15426    0.11152  -1.383   0.1685  
## PC4          0.19449    0.19496   0.998   0.3200  
## PC5         -0.17050    0.08276  -2.060   0.0410 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.96 on 163 degrees of freedom
## Multiple R-squared:  0.09015,    Adjusted R-squared:  0.05666 
## F-statistic: 2.692 on 6 and 163 DF,  p-value: 0.01616
step_sim_BPRS.lm <- stepAIC(full_sim_BPRS.lm)
## Start:  AIC=-7.01
## BPRS ~ PC3_univ + PC1 + PC2 + PC3 + PC4 + PC5
## 
##            Df Sum of Sq    RSS     AIC
## - PC3_univ  1    0.2091 150.44 -8.7763
## - PC4       1    0.9172 151.15 -7.9781
## - PC2       1    0.9522 151.19 -7.9387
## - PC3       1    1.7635 152.00 -7.0289
## <none>                  150.23 -7.0128
## - PC1       1    3.0932 153.33 -5.5481
## - PC5       1    3.9118 154.15 -4.6429
## 
## Step:  AIC=-8.78
## BPRS ~ PC1 + PC2 + PC3 + PC4 + PC5
## 
##        Df Sum of Sq    RSS     AIC
## - PC2   1    1.3870 151.83 -9.2162
## <none>              150.44 -8.7763
## - PC4   1    2.1015 152.54 -8.4180
## - PC3   1    2.8293 153.27 -7.6089
## - PC1   1    2.9335 153.38 -7.4933
## - PC5   1    5.4245 155.87 -4.7546
## 
## Step:  AIC=-9.22
## BPRS ~ PC1 + PC3 + PC4 + PC5
## 
##        Df Sum of Sq    RSS     AIC
## <none>              151.83 -9.2162
## - PC4   1    2.1015 153.93 -8.8793
## - PC3   1    2.8293 154.66 -8.0774
## - PC1   1    2.9335 154.76 -7.9629
## - PC5   1    5.4245 157.25 -5.2485
summary(step_sim_BPRS.lm)
## 
## Call:
## lm(formula = BPRS ~ PC1 + PC3 + PC4 + PC5, data = data_reg6)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7788 -0.6763 -0.2046  0.4720  4.4835 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -0.02961    0.07357  -0.402   0.6879  
## PC1          0.04855    0.02719   1.785   0.0760 .
## PC3         -0.11044    0.06298  -1.753   0.0814 .
## PC4          0.10811    0.07154   1.511   0.1326  
## PC5         -0.18556    0.07643  -2.428   0.0163 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9593 on 165 degrees of freedom
## Multiple R-squared:  0.08048,    Adjusted R-squared:  0.05819 
## F-statistic:  3.61 on 4 and 165 DF,  p-value: 0.007531

Statistically comparing shows that we do indeed see an improvement in the model when we include the similarity measures.

anova(step_BPRS_univ,step_sim_BPRS.lm)
## Analysis of Variance Table
## 
## Model 1: BPRS ~ PC3_univ
## Model 2: BPRS ~ PC1 + PC3 + PC4 + PC5
##   Res.Df    RSS Df Sum of Sq      F   Pr(>F)   
## 1    168 163.01                                
## 2    165 151.83  3    11.183 4.0511 0.008245 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Add MVPA

Now, let’s add the MVPA PCs in.

data_reg7 <- data.frame(BPRS = data_for_reg$BPRS,  PC3_univ=res.pca[["x"]][,3], PC1_sim=res_sim.pca[["x"]][,1], PC5_sim=res_sim.pca[["x"]][,5], res_MVPA.pca[["x"]][,1:12])
colnames(data_reg7)[5:16] <- paste(colnames(data_reg7)[5:16],"_MVPA", sep="")

full_sim_MVPA_BPRS.lm <- lm(BPRS ~.,data=data_reg7)
summary(full_sim_MVPA_BPRS.lm)
## 
## Call:
## lm(formula = BPRS ~ ., data = data_reg7)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7140 -0.6482 -0.1452  0.4379  4.1165 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.029605   0.073614  -0.402  0.68811   
## PC3_univ     0.102390   0.046493   2.202  0.02913 * 
## PC1_sim      0.032501   0.030728   1.058  0.29185   
## PC5_sim     -0.231005   0.080989  -2.852  0.00494 **
## PC1_MVPA    -0.008607   0.034183  -0.252  0.80153   
## PC2_MVPA    -0.026976   0.038997  -0.692  0.49013   
## PC3_MVPA     0.034061   0.040114   0.849  0.39714   
## PC4_MVPA     0.103546   0.044200   2.343  0.02043 * 
## PC5_MVPA     0.011908   0.046397   0.257  0.79780   
## PC6_MVPA    -0.021458   0.049965  -0.429  0.66818   
## PC7_MVPA     0.106779   0.063931   1.670  0.09691 . 
## PC8_MVPA     0.063818   0.064477   0.990  0.32383   
## PC9_MVPA     0.001816   0.066664   0.027  0.97830   
## PC10_MVPA   -0.089922   0.075342  -1.194  0.23450   
## PC11_MVPA   -0.060219   0.077759  -0.774  0.43986   
## PC12_MVPA   -0.050401   0.081965  -0.615  0.53952   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9598 on 154 degrees of freedom
## Multiple R-squared:  0.1408, Adjusted R-squared:  0.05712 
## F-statistic: 1.683 on 15 and 154 DF,  p-value: 0.05958
step_sim_MVPA_BPRS.lm <- stepAIC(full_sim_MVPA_BPRS.lm)
## Start:  AIC=1.25
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC1_MVPA + PC2_MVPA + PC3_MVPA + 
##     PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + PC8_MVPA + PC9_MVPA + 
##     PC10_MVPA + PC11_MVPA + PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC9_MVPA   1    0.0007 141.87 -0.7521
## - PC1_MVPA   1    0.0584 141.93 -0.6830
## - PC5_MVPA   1    0.0607 141.93 -0.6803
## - PC6_MVPA   1    0.1699 142.04 -0.5495
## - PC12_MVPA  1    0.3483 142.22 -0.3361
## - PC2_MVPA   1    0.4408 142.31 -0.2255
## - PC11_MVPA  1    0.5525 142.42 -0.0922
## - PC3_MVPA   1    0.6642 142.53  0.0411
## - PC8_MVPA   1    0.9025 142.77  0.3251
## - PC1_sim    1    1.0306 142.90  0.4775
## - PC10_MVPA  1    1.3123 143.18  0.8123
## <none>                   141.87  1.2470
## - PC7_MVPA   1    2.5699 144.44  2.2989
## - PC3_univ   1    4.4680 146.34  4.5185
## - PC4_MVPA   1    5.0558 146.92  5.1999
## - PC5_sim    1    7.4947 149.36  7.9988
## 
## Step:  AIC=-0.75
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC1_MVPA + PC2_MVPA + PC3_MVPA + 
##     PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + PC8_MVPA + PC10_MVPA + 
##     PC11_MVPA + PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC1_MVPA   1    0.0587 141.93 -2.6818
## - PC5_MVPA   1    0.0604 141.93 -2.6798
## - PC6_MVPA   1    0.1709 142.04 -2.5474
## - PC12_MVPA  1    0.3477 142.22 -2.3359
## - PC2_MVPA   1    0.4434 142.31 -2.2216
## - PC11_MVPA  1    0.5546 142.42 -2.0889
## - PC3_MVPA   1    0.6636 142.53 -1.9588
## - PC8_MVPA   1    0.9031 142.77 -1.6734
## - PC1_sim    1    1.0602 142.93 -1.4864
## - PC10_MVPA  1    1.3117 143.18 -1.1875
## <none>                   141.87 -0.7521
## - PC7_MVPA   1    2.5693 144.44  0.2991
## - PC3_univ   1    4.4734 146.34  2.5255
## - PC4_MVPA   1    5.0554 146.92  3.2002
## - PC5_sim    1    7.6679 149.54  6.1965
## 
## Step:  AIC=-2.68
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC2_MVPA + PC3_MVPA + PC4_MVPA + 
##     PC5_MVPA + PC6_MVPA + PC7_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA + 
##     PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC5_MVPA   1    0.0617 141.99 -4.6080
## - PC6_MVPA   1    0.1674 142.09 -4.4814
## - PC12_MVPA  1    0.3531 142.28 -4.2594
## - PC2_MVPA   1    0.4376 142.37 -4.1584
## - PC11_MVPA  1    0.5501 142.48 -4.0241
## - PC3_MVPA   1    0.6653 142.59 -3.8868
## - PC8_MVPA   1    0.9011 142.83 -3.6059
## - PC1_sim    1    1.0366 142.96 -3.4447
## - PC10_MVPA  1    1.3141 143.24 -3.1151
## <none>                   141.93 -2.6818
## - PC7_MVPA   1    2.5697 144.50 -1.6314
## - PC3_univ   1    4.4780 146.41  0.5991
## - PC4_MVPA   1    5.0635 146.99  1.2775
## - PC5_sim    1    7.6095 149.54  4.1968
## 
## Step:  AIC=-4.61
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC2_MVPA + PC3_MVPA + PC4_MVPA + 
##     PC6_MVPA + PC7_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA + 
##     PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC6_MVPA   1    0.1735 142.16 -6.4004
## - PC12_MVPA  1    0.3515 142.34 -6.1877
## - PC2_MVPA   1    0.4514 142.44 -6.0683
## - PC11_MVPA  1    0.5634 142.55 -5.9348
## - PC3_MVPA   1    0.6527 142.64 -5.8283
## - PC8_MVPA   1    0.9043 142.89 -5.5287
## - PC1_sim    1    1.1659 143.16 -5.2177
## - PC10_MVPA  1    1.3054 143.29 -5.0522
## <none>                   141.99 -4.6080
## - PC7_MVPA   1    2.5513 144.54 -3.5804
## - PC3_univ   1    4.4728 146.46 -1.3355
## - PC4_MVPA   1    5.0353 147.03 -0.6838
## - PC5_sim    1    7.6315 149.62  2.2919
## 
## Step:  AIC=-6.4
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC2_MVPA + PC3_MVPA + PC4_MVPA + 
##     PC7_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA + PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC12_MVPA  1    0.3619 142.53 -7.9682
## - PC2_MVPA   1    0.4293 142.59 -7.8878
## - PC11_MVPA  1    0.5439 142.71 -7.7512
## - PC3_MVPA   1    0.6675 142.83 -7.6041
## - PC8_MVPA   1    0.8978 143.06 -7.3302
## - PC1_sim    1    1.0580 143.22 -7.1399
## - PC10_MVPA  1    1.3184 143.48 -6.8311
## <none>                   142.16 -6.4004
## - PC7_MVPA   1    2.5697 144.73 -5.3550
## - PC3_univ   1    4.4628 146.63 -3.1458
## - PC4_MVPA   1    5.0784 147.24 -2.4335
## - PC5_sim    1    7.4759 149.64  0.3122
## 
## Step:  AIC=-7.97
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC2_MVPA + PC3_MVPA + PC4_MVPA + 
##     PC7_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC2_MVPA   1    0.4418 142.97 -9.4420
## - PC11_MVPA  1    0.5503 143.07 -9.3131
## - PC3_MVPA   1    0.6760 143.20 -9.1637
## - PC8_MVPA   1    0.9036 143.43 -8.8938
## - PC1_sim    1    1.0763 143.60 -8.6892
## - PC10_MVPA  1    1.3183 143.84 -8.4029
## <none>                   142.53 -7.9682
## - PC7_MVPA   1    2.5928 145.12 -6.9033
## - PC3_univ   1    4.4475 146.97 -4.7444
## - PC4_MVPA   1    5.0805 147.60 -4.0137
## - PC5_sim    1    8.3247 150.85 -0.3178
## 
## Step:  AIC=-9.44
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC3_MVPA + PC4_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS      AIC
## - PC11_MVPA  1    0.4918 143.46 -10.8582
## - PC3_MVPA   1    0.7073 143.67 -10.6031
## - PC1_sim    1    0.8412 143.81 -10.4447
## - PC8_MVPA   1    0.8858 143.85 -10.3920
## - PC10_MVPA  1    1.3622 144.33  -9.8299
## <none>                   142.97  -9.4420
## - PC7_MVPA   1    2.6324 145.60  -8.3403
## - PC3_univ   1    4.1190 147.09  -6.6133
## - PC4_MVPA   1    5.1427 148.11  -5.4343
## - PC5_sim    1    8.0318 151.00  -2.1501
## 
## Step:  AIC=-10.86
## BPRS ~ PC3_univ + PC1_sim + PC5_sim + PC3_MVPA + PC4_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC10_MVPA
## 
##             Df Sum of Sq    RSS      AIC
## - PC1_sim    1    0.6500 144.11 -12.0897
## - PC3_MVPA   1    0.7374 144.20 -11.9866
## - PC8_MVPA   1    0.8719 144.33 -11.8281
## - PC10_MVPA  1    1.4002 144.86 -11.2070
## <none>                   143.46 -10.8582
## - PC7_MVPA   1    2.6731 146.13  -9.7197
## - PC3_univ   1    3.8280 147.29  -8.3815
## - PC4_MVPA   1    5.1988 148.66  -6.8065
## - PC5_sim    1    7.8760 151.33  -3.7723
## 
## Step:  AIC=-12.09
## BPRS ~ PC3_univ + PC5_sim + PC3_MVPA + PC4_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC10_MVPA
## 
##             Df Sum of Sq    RSS      AIC
## - PC8_MVPA   1    0.8267 144.94 -13.1172
## - PC3_MVPA   1    1.0473 145.16 -12.8587
## - PC10_MVPA  1    1.5707 145.68 -12.2469
## <none>                   144.11 -12.0897
## - PC7_MVPA   1    3.1220 147.23 -10.4462
## - PC3_univ   1    4.0533 148.16  -9.3742
## - PC4_MVPA   1    5.9439 150.05  -7.2186
## - PC5_sim    1    8.0401 152.15  -4.8602
## 
## Step:  AIC=-13.12
## BPRS ~ PC3_univ + PC5_sim + PC3_MVPA + PC4_MVPA + PC7_MVPA + 
##     PC10_MVPA
## 
##             Df Sum of Sq    RSS      AIC
## - PC3_MVPA   1    1.0418 145.98 -13.8997
## - PC10_MVPA  1    1.5744 146.51 -13.2805
## <none>                   144.94 -13.1172
## - PC7_MVPA   1    3.1116 148.05 -11.5062
## - PC3_univ   1    3.9460 148.88 -10.5507
## - PC4_MVPA   1    5.9313 150.87  -8.2987
## - PC5_sim    1    7.8935 152.83  -6.1020
## 
## Step:  AIC=-13.9
## BPRS ~ PC3_univ + PC5_sim + PC4_MVPA + PC7_MVPA + PC10_MVPA
## 
##             Df Sum of Sq    RSS      AIC
## - PC10_MVPA  1    1.5801 147.56 -14.0694
## <none>                   145.98 -13.8997
## - PC7_MVPA   1    3.0876 149.06 -12.3415
## - PC3_univ   1    3.7809 149.76 -11.5526
## - PC4_MVPA   1    5.9089 151.89  -9.1540
## - PC5_sim    1    7.5358 153.51  -7.3428
## 
## Step:  AIC=-14.07
## BPRS ~ PC3_univ + PC5_sim + PC4_MVPA + PC7_MVPA
## 
##            Df Sum of Sq    RSS      AIC
## <none>                  147.56 -14.0694
## - PC7_MVPA  1    3.0962 150.65 -12.5392
## - PC3_univ  1    4.0859 151.64 -11.4260
## - PC4_MVPA  1    5.9357 153.49  -9.3648
## - PC5_sim   1    7.5580 155.12  -7.5775
summary(step_sim_MVPA_BPRS.lm)
## 
## Call:
## lm(formula = BPRS ~ PC3_univ + PC5_sim + PC4_MVPA + PC7_MVPA, 
##     data = data_reg7)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.7167 -0.6398 -0.1854  0.4170  4.1451 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.02961    0.07253  -0.408  0.68367   
## PC3_univ     0.09538    0.04462   2.138  0.03403 * 
## PC5_sim     -0.22181    0.07630  -2.907  0.00415 **
## PC4_MVPA     0.11065    0.04295   2.576  0.01086 * 
## PC7_MVPA     0.11592    0.06230   1.861  0.06457 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9457 on 165 degrees of freedom
## Multiple R-squared:  0.1064, Adjusted R-squared:  0.0847 
## F-statistic:  4.91 on 4 and 165 DF,  p-value: 0.0009141

Adding in MVPA, we see that there is a sigificant relationship between BPRS and PC4 (fusiform delay and probe, mostly indiv trials), and a trending one with PC7 (high incorrect and low correct in fusiform across trial, mostly in individual trials). Now, let’s see if the model is actually better. We can’t run an ANOVA, but including the MVPA variables increases the adjusted R^2 value.

View(anova(step_sim_BPRS.lm,step_sim_MVPA_BPRS.lm))

Predicting Accuracy

Finally, lets try to predict accuracy, and see if adding in similarity adds to that analysis.

Only univariate

It’s the first PC (load effect at encoding/encoding+encoding-delay) and second PC (load effect at delay) that predicts accuracy, though the encoding - delay does trend.

data_reg8 <- data.frame(high_acc = data_for_reg$high_acc,PC1_univ = res.pca[["x"]][,1], PC2_univ = res.pca[["x"]][,2], PC3_univ = res.pca[["x"]][,3])

full_acc_univ.lm <- lm(high_acc ~ ., data=data_reg8 )
summary(full_acc_univ.lm)
## 
## Call:
## lm(formula = high_acc ~ ., data = data_reg8)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.25987 -0.05379  0.01136  0.06716  0.24944 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.737868   0.007316 100.852  < 2e-16 ***
## PC1_univ     0.007496   0.001936   3.872 0.000155 ***
## PC2_univ    -0.006517   0.002610  -2.497 0.013505 *  
## PC3_univ    -0.008704   0.004446  -1.958 0.051926 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.09539 on 166 degrees of freedom
## Multiple R-squared:  0.1312, Adjusted R-squared:  0.1155 
## F-statistic: 8.354 on 3 and 166 DF,  p-value: 3.317e-05
step_acc_univ <- stepAIC(full_acc_univ.lm)
## Start:  AIC=-794.96
## high_acc ~ PC1_univ + PC2_univ + PC3_univ
## 
##            Df Sum of Sq    RSS     AIC
## <none>                  1.5106 -794.96
## - PC3_univ  1  0.034881 1.5455 -793.08
## - PC2_univ  1  0.056732 1.5673 -790.69
## - PC1_univ  1  0.136443 1.6470 -782.26
summary(step_acc_univ)
## 
## Call:
## lm(formula = high_acc ~ PC1_univ + PC2_univ + PC3_univ, data = data_reg8)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.25987 -0.05379  0.01136  0.06716  0.24944 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.737868   0.007316 100.852  < 2e-16 ***
## PC1_univ     0.007496   0.001936   3.872 0.000155 ***
## PC2_univ    -0.006517   0.002610  -2.497 0.013505 *  
## PC3_univ    -0.008704   0.004446  -1.958 0.051926 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.09539 on 166 degrees of freedom
## Multiple R-squared:  0.1312, Adjusted R-squared:  0.1155 
## F-statistic: 8.354 on 3 and 166 DF,  p-value: 3.317e-05

Add similarity

When we add in similarity PCs, we see that similarity PC1 (mostly related to within TR high load correct trials (regardless of area) and across TR similarity at high load in the fusiform), 3 (fusiform similarity during encoding (regardless of accuracy), delay similarity in DFR) and 4 (how similar high load incorrect trials are to the template correct trials and low load correct trials in fusiform) have a significant relationships with accuracy. We see that PCs 2 (delay load effect) and 3 (encoding - delay) from the univariate analysis

data_reg9 <- data.frame(high_acc = data_for_reg$high_acc,PC1_univ = res.pca[["x"]][,1], PC2_univ = res.pca[["x"]][,2], PC3_univ = res.pca[["x"]][,3], res_sim.pca[["x"]][,1:5])

full_acc_univ_sim.lm <- lm(high_acc ~ ., data=data_reg9)
summary(full_acc_univ_sim.lm)
## 
## Call:
## lm(formula = high_acc ~ ., data = data_reg9)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.267988 -0.052328  0.004231  0.057355  0.243373 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.737868   0.006894 107.033  < 2e-16 ***
## PC1_univ    -0.051618   0.026224  -1.968  0.05074 .  
## PC2_univ    -0.015282   0.006382  -2.395  0.01779 *  
## PC3_univ     0.038671   0.016814   2.300  0.02274 *  
## PC1         -0.075974   0.031115  -2.442  0.01570 *  
## PC2          0.055228   0.028730   1.922  0.05633 .  
## PC3          0.032874   0.011510   2.856  0.00485 ** 
## PC4         -0.047315   0.021853  -2.165  0.03185 *  
## PC5         -0.004385   0.008040  -0.545  0.58620    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.08988 on 161 degrees of freedom
## Multiple R-squared:  0.2519, Adjusted R-squared:  0.2147 
## F-statistic: 6.775 on 8 and 161 DF,  p-value: 1.199e-07
step_acc_univ_sim <- stepAIC(full_acc_univ_sim.lm)
## Start:  AIC=-810.38
## high_acc ~ PC1_univ + PC2_univ + PC3_univ + PC1 + PC2 + PC3 + 
##     PC4 + PC5
## 
##            Df Sum of Sq    RSS     AIC
## - PC5       1  0.002404 1.3032 -812.07
## <none>                  1.3008 -810.38
## - PC2       1  0.029855 1.3306 -808.53
## - PC1_univ  1  0.031303 1.3321 -808.34
## - PC4       1  0.037874 1.3386 -807.50
## - PC3_univ  1  0.042737 1.3435 -806.89
## - PC2_univ  1  0.046327 1.3471 -806.43
## - PC1       1  0.048170 1.3489 -806.20
## - PC3       1  0.065907 1.3667 -803.98
## 
## Step:  AIC=-812.07
## high_acc ~ PC1_univ + PC2_univ + PC3_univ + PC1 + PC2 + PC3 + 
##     PC4
## 
##            Df Sum of Sq    RSS     AIC
## <none>                  1.3032 -812.07
## - PC2       1  0.027568 1.3307 -810.51
## - PC1_univ  1  0.029047 1.3322 -810.32
## - PC4       1  0.036284 1.3395 -809.40
## - PC3_univ  1  0.042829 1.3460 -808.57
## - PC2_univ  1  0.044608 1.3478 -808.35
## - PC1       1  0.045772 1.3489 -808.20
## - PC3       1  0.066326 1.3695 -805.63
summary(step_acc_univ_sim)
## 
## Call:
## lm(formula = high_acc ~ PC1_univ + PC2_univ + PC3_univ + PC1 + 
##     PC2 + PC3 + PC4, data = data_reg9)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.262252 -0.051478  0.004053  0.057553  0.239201 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.737868   0.006879 107.265  < 2e-16 ***
## PC1_univ    -0.048615   0.025584  -1.900  0.05918 .  
## PC2_univ    -0.014910   0.006332  -2.355  0.01973 *  
## PC3_univ     0.034520   0.014961   2.307  0.02230 *  
## PC1         -0.072357   0.030334  -2.385  0.01822 *  
## PC2          0.051738   0.027948   1.851  0.06596 .  
## PC3          0.030474   0.010613   2.871  0.00463 ** 
## PC4         -0.042702   0.020106  -2.124  0.03521 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.08969 on 162 degrees of freedom
## Multiple R-squared:  0.2505, Adjusted R-squared:  0.2181 
## F-statistic: 7.734 on 7 and 162 DF,  p-value: 4.651e-08

When we formally compare models, we can see that adding in the principal components for similarity do indeed improve the model.

anova(step_acc_univ,step_acc_univ_sim)
## Analysis of Variance Table
## 
## Model 1: high_acc ~ PC1_univ + PC2_univ + PC3_univ
## Model 2: high_acc ~ PC1_univ + PC2_univ + PC3_univ + PC1 + PC2 + PC3 + 
##     PC4
##   Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
## 1    166 1.5106                                  
## 2    162 1.3032  4   0.20742 6.4462 7.723e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Add MVPA

Now, let’s add the MVPA principal components.

data_reg10 <- data.frame(high_acc = data_for_reg$high_acc,PC1_univ = res.pca[["x"]][,1], PC2_univ = res.pca[["x"]][,2], PC3_univ = res.pca[["x"]][,3],PC2_sim=res_sim.pca[["x"]][,2], PC3_sim=res_sim.pca[["x"]][,3], PC4_sim=res_sim.pca[["x"]][,4], res_MVPA.pca[["x"]][,1:12])
colnames(data_reg10)[8:19] <- paste(colnames(data_reg10)[8:19],"_MVPA", sep="")

full_acc_univ_sim_MVPA.lm <- lm(high_acc ~ ., data=data_reg10)
summary(full_acc_univ_sim_MVPA.lm)
## 
## Call:
## lm(formula = high_acc ~ ., data = data_reg10)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.256481 -0.054338  0.006377  0.055312  0.262255 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.7378676  0.0066363 111.187  < 2e-16 ***
## PC1_univ     0.0125426  0.0023837   5.262 4.81e-07 ***
## PC2_univ    -0.0005142  0.0029912  -0.172  0.86375    
## PC3_univ     0.0249124  0.0136005   1.832  0.06896 .  
## PC2_sim     -0.0154903  0.0047826  -3.239  0.00148 ** 
## PC3_sim      0.0324616  0.0104022   3.121  0.00216 ** 
## PC4_sim     -0.0529599  0.0201387  -2.630  0.00943 ** 
## PC1_MVPA     0.0010889  0.0030956   0.352  0.72551    
## PC2_MVPA     0.0090219  0.0035152   2.567  0.01125 *  
## PC3_MVPA    -0.0040617  0.0036365  -1.117  0.26580    
## PC4_MVPA    -0.0069834  0.0040880  -1.708  0.08964 .  
## PC5_MVPA     0.0030584  0.0045866   0.667  0.50591    
## PC6_MVPA     0.0027555  0.0044995   0.612  0.54119    
## PC7_MVPA    -0.0053106  0.0057938  -0.917  0.36081    
## PC8_MVPA     0.0093276  0.0060587   1.540  0.12577    
## PC9_MVPA     0.0058500  0.0060221   0.971  0.33289    
## PC10_MVPA   -0.0199204  0.0069394  -2.871  0.00469 ** 
## PC11_MVPA   -0.0134193  0.0071004  -1.890  0.06068 .  
## PC12_MVPA    0.0036735  0.0072902   0.504  0.61507    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.08653 on 151 degrees of freedom
## Multiple R-squared:  0.3498, Adjusted R-squared:  0.2723 
## F-statistic: 4.513 on 18 and 151 DF,  p-value: 8.808e-08
step_acc_univ_sim_MVPA <- stepAIC(full_acc_univ_sim_MVPA.lm)
## Start:  AIC=-814.23
## high_acc ~ PC1_univ + PC2_univ + PC3_univ + PC2_sim + PC3_sim + 
##     PC4_sim + PC1_MVPA + PC2_MVPA + PC3_MVPA + PC4_MVPA + PC5_MVPA + 
##     PC6_MVPA + PC7_MVPA + PC8_MVPA + PC9_MVPA + PC10_MVPA + PC11_MVPA + 
##     PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC2_univ   1  0.000221 1.1307 -816.20
## - PC1_MVPA   1  0.000926 1.1314 -816.09
## - PC12_MVPA  1  0.001901 1.1324 -815.95
## - PC6_MVPA   1  0.002808 1.1333 -815.81
## - PC5_MVPA   1  0.003329 1.1338 -815.73
## - PC7_MVPA   1  0.006290 1.1368 -815.29
## - PC9_MVPA   1  0.007065 1.1376 -815.17
## - PC3_MVPA   1  0.009340 1.1398 -814.83
## <none>                   1.1305 -814.23
## - PC8_MVPA   1  0.017745 1.1482 -813.59
## - PC4_MVPA   1  0.021848 1.1523 -812.98
## - PC3_univ   1  0.025120 1.1556 -812.50
## - PC11_MVPA  1  0.026742 1.1572 -812.26
## - PC2_MVPA   1  0.049315 1.1798 -808.97
## - PC4_sim    1  0.051776 1.1823 -808.62
## - PC10_MVPA  1  0.061694 1.1922 -807.20
## - PC3_sim    1  0.072910 1.2034 -805.61
## - PC2_sim    1  0.078540 1.2090 -804.81
## - PC1_univ   1  0.207277 1.3378 -787.61
## 
## Step:  AIC=-816.2
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC1_MVPA + PC2_MVPA + PC3_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + 
##     PC7_MVPA + PC8_MVPA + PC9_MVPA + PC10_MVPA + PC11_MVPA + 
##     PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC1_MVPA   1  0.000898 1.1316 -818.06
## - PC12_MVPA  1  0.001849 1.1326 -817.92
## - PC6_MVPA   1  0.002907 1.1336 -817.76
## - PC5_MVPA   1  0.003354 1.1341 -817.70
## - PC7_MVPA   1  0.006222 1.1369 -817.27
## - PC9_MVPA   1  0.007045 1.1378 -817.14
## - PC3_MVPA   1  0.009124 1.1399 -816.83
## <none>                   1.1307 -816.20
## - PC8_MVPA   1  0.018738 1.1495 -815.41
## - PC4_MVPA   1  0.021635 1.1524 -814.98
## - PC11_MVPA  1  0.026961 1.1577 -814.19
## - PC3_univ   1  0.035433 1.1662 -812.95
## - PC2_MVPA   1  0.050258 1.1810 -810.81
## - PC10_MVPA  1  0.062394 1.1931 -809.07
## - PC4_sim    1  0.076866 1.2076 -807.02
## - PC2_sim    1  0.081616 1.2123 -806.35
## - PC3_sim    1  0.085636 1.2164 -805.79
## - PC1_univ   1  0.215562 1.3463 -788.54
## 
## Step:  AIC=-818.06
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC3_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC9_MVPA + PC10_MVPA + PC11_MVPA + PC12_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC12_MVPA  1  0.001830 1.1335 -819.79
## - PC6_MVPA   1  0.002867 1.1345 -819.63
## - PC5_MVPA   1  0.003204 1.1348 -819.58
## - PC7_MVPA   1  0.006189 1.1378 -819.14
## - PC9_MVPA   1  0.006977 1.1386 -819.02
## - PC3_MVPA   1  0.009228 1.1408 -818.68
## <none>                   1.1316 -818.06
## - PC8_MVPA   1  0.018810 1.1504 -817.26
## - PC4_MVPA   1  0.021867 1.1535 -816.81
## - PC11_MVPA  1  0.027163 1.1588 -816.03
## - PC3_univ   1  0.034613 1.1662 -814.94
## - PC2_MVPA   1  0.050035 1.1817 -812.71
## - PC10_MVPA  1  0.062178 1.1938 -810.97
## - PC4_sim    1  0.075982 1.2076 -809.02
## - PC2_sim    1  0.081014 1.2126 -808.31
## - PC3_sim    1  0.084770 1.2164 -807.78
## - PC1_univ   1  0.214702 1.3463 -790.53
## 
## Step:  AIC=-819.79
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC3_MVPA + PC4_MVPA + PC5_MVPA + PC6_MVPA + PC7_MVPA + 
##     PC8_MVPA + PC9_MVPA + PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC6_MVPA   1  0.002860 1.1363 -821.36
## - PC5_MVPA   1  0.003155 1.1366 -821.32
## - PC7_MVPA   1  0.006120 1.1396 -820.87
## - PC9_MVPA   1  0.006940 1.1404 -820.75
## - PC3_MVPA   1  0.009242 1.1427 -820.41
## <none>                   1.1335 -819.79
## - PC8_MVPA   1  0.018868 1.1523 -818.98
## - PC4_MVPA   1  0.021868 1.1553 -818.54
## - PC11_MVPA  1  0.027249 1.1607 -817.75
## - PC3_univ   1  0.033908 1.1674 -816.78
## - PC2_MVPA   1  0.049855 1.1833 -814.47
## - PC10_MVPA  1  0.062103 1.1956 -812.72
## - PC4_sim    1  0.074773 1.2082 -810.93
## - PC2_sim    1  0.081236 1.2147 -810.02
## - PC3_sim    1  0.083655 1.2171 -809.68
## - PC1_univ   1  0.214504 1.3480 -792.33
## 
## Step:  AIC=-821.36
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC3_MVPA + PC4_MVPA + PC5_MVPA + PC7_MVPA + PC8_MVPA + 
##     PC9_MVPA + PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC5_MVPA   1  0.002942 1.1393 -822.92
## - PC7_MVPA   1  0.006251 1.1426 -822.43
## - PC9_MVPA   1  0.006694 1.1430 -822.36
## - PC3_MVPA   1  0.009552 1.1459 -821.94
## <none>                   1.1363 -821.36
## - PC8_MVPA   1  0.018664 1.1550 -820.59
## - PC4_MVPA   1  0.022385 1.1587 -820.05
## - PC11_MVPA  1  0.027628 1.1639 -819.28
## - PC3_univ   1  0.033465 1.1698 -818.43
## - PC2_MVPA   1  0.049242 1.1856 -816.15
## - PC10_MVPA  1  0.061679 1.1980 -814.38
## - PC4_sim    1  0.074388 1.2107 -812.58
## - PC2_sim    1  0.078791 1.2151 -811.96
## - PC3_sim    1  0.082000 1.2183 -811.52
## - PC1_univ   1  0.211812 1.3481 -794.30
## 
## Step:  AIC=-822.92
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC3_MVPA + PC4_MVPA + PC7_MVPA + PC8_MVPA + PC9_MVPA + 
##     PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC7_MVPA   1  0.006355 1.1456 -823.98
## - PC9_MVPA   1  0.006677 1.1459 -823.93
## - PC3_MVPA   1  0.009993 1.1493 -823.44
## <none>                   1.1393 -822.92
## - PC8_MVPA   1  0.018452 1.1577 -822.19
## - PC4_MVPA   1  0.024488 1.1637 -821.31
## - PC11_MVPA  1  0.029369 1.1686 -820.60
## - PC3_univ   1  0.031567 1.1708 -820.28
## - PC2_MVPA   1  0.048571 1.1878 -817.82
## - PC10_MVPA  1  0.059753 1.1990 -816.23
## - PC4_sim    1  0.071461 1.2107 -814.58
## - PC2_sim    1  0.078175 1.2174 -813.64
## - PC3_sim    1  0.081276 1.2205 -813.21
## - PC1_univ   1  0.211498 1.3507 -795.97
## 
## Step:  AIC=-823.98
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC3_MVPA + PC4_MVPA + PC8_MVPA + PC9_MVPA + PC10_MVPA + 
##     PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC9_MVPA   1  0.006741 1.1523 -824.98
## - PC3_MVPA   1  0.009726 1.1553 -824.54
## <none>                   1.1456 -823.98
## - PC8_MVPA   1  0.018607 1.1642 -823.24
## - PC4_MVPA   1  0.023937 1.1696 -822.46
## - PC3_univ   1  0.028428 1.1740 -821.81
## - PC11_MVPA  1  0.028839 1.1744 -821.75
## - PC2_MVPA   1  0.048940 1.1946 -818.87
## - PC10_MVPA  1  0.060202 1.2058 -817.27
## - PC4_sim    1  0.066851 1.2125 -816.33
## - PC3_sim    1  0.076902 1.2225 -814.93
## - PC2_sim    1  0.084362 1.2300 -813.90
## - PC1_univ   1  0.223302 1.3689 -795.70
## 
## Step:  AIC=-824.98
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC3_MVPA + PC4_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## - PC3_MVPA   1  0.010234 1.1626 -825.48
## <none>                   1.1523 -824.98
## - PC8_MVPA   1  0.018706 1.1711 -824.24
## - PC4_MVPA   1  0.024159 1.1765 -823.45
## - PC3_univ   1  0.026654 1.1790 -823.09
## - PC11_MVPA  1  0.029168 1.1815 -822.73
## - PC2_MVPA   1  0.047598 1.2000 -820.10
## - PC10_MVPA  1  0.060365 1.2127 -818.30
## - PC4_sim    1  0.064740 1.2171 -817.69
## - PC3_sim    1  0.072353 1.2247 -816.63
## - PC2_sim    1  0.083661 1.2360 -815.06
## - PC1_univ   1  0.216771 1.3691 -797.68
## 
## Step:  AIC=-825.48
## high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC4_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA
## 
##             Df Sum of Sq    RSS     AIC
## <none>                   1.1626 -825.48
## - PC8_MVPA   1  0.018516 1.1811 -824.79
## - PC4_MVPA   1  0.023255 1.1858 -824.11
## - PC3_univ   1  0.028082 1.1907 -823.42
## - PC11_MVPA  1  0.028285 1.1909 -823.39
## - PC2_MVPA   1  0.049112 1.2117 -820.44
## - PC10_MVPA  1  0.060957 1.2235 -818.79
## - PC4_sim    1  0.066551 1.2291 -818.01
## - PC3_sim    1  0.074923 1.2375 -816.86
## - PC2_sim    1  0.089180 1.2518 -814.91
## - PC1_univ   1  0.240701 1.4033 -795.49
summary(step_acc_univ_sim_MVPA)
## 
## Call:
## lm(formula = high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + 
##     PC4_sim + PC2_MVPA + PC4_MVPA + PC8_MVPA + PC10_MVPA + PC11_MVPA, 
##     data = data_reg10)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.242338 -0.053139  0.001629  0.058010  0.264967 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.737868   0.006558 112.510  < 2e-16 ***
## PC1_univ     0.012396   0.002160   5.738 4.72e-08 ***
## PC3_univ     0.022542   0.011502   1.960  0.05177 .  
## PC2_sim     -0.014995   0.004294  -3.492  0.00062 ***
## PC3_sim      0.030183   0.009429   3.201  0.00165 ** 
## PC4_sim     -0.049002   0.016242  -3.017  0.00297 ** 
## PC2_MVPA     0.008949   0.003453   2.592  0.01044 *  
## PC4_MVPA    -0.007127   0.003996  -1.783  0.07643 .  
## PC8_MVPA     0.009421   0.005921   1.591  0.11352    
## PC10_MVPA   -0.019674   0.006814  -2.887  0.00443 ** 
## PC11_MVPA   -0.013729   0.006980  -1.967  0.05094 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.08551 on 159 degrees of freedom
## Multiple R-squared:  0.3313, Adjusted R-squared:  0.2893 
## F-statistic: 7.879 on 10 and 159 DF,  p-value: 3.198e-10

We see that MVPA PCs 2 (DFR encoding and delay for mostly indiv trials) and 10 (low correct and high incorrect in fusiform averages from template) have significant relationships, with PC4 (fusiform delay and probe, mostly indiv trials) and 11 (all trial types, mostly geared towards DFR (regardless of individual or template) during probe and delay) have trending relationships. The algorithm still included PC8, which doesn’t have a significant relationship, so let’s remove this and then compare models.

We saw that PC 4 also had a relationship with BPRS.

Adding in the MVPA data does provide a significant increase in explained variance!

acc_univ_sim_MVPA.lm <- lm(high_acc ~ PC1_univ + PC3_univ+PC2_sim+PC3_sim+PC4_sim+PC2_MVPA+PC4_MVPA+PC10_MVPA+PC11_MVPA, data = data_reg10)

anova(acc_univ_sim_MVPA.lm,step_acc_univ_sim)
## Analysis of Variance Table
## 
## Model 1: high_acc ~ PC1_univ + PC3_univ + PC2_sim + PC3_sim + PC4_sim + 
##     PC2_MVPA + PC4_MVPA + PC10_MVPA + PC11_MVPA
## Model 2: high_acc ~ PC1_univ + PC2_univ + PC3_univ + PC1 + PC2 + PC3 + 
##     PC4
##   Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
## 1    160 1.1811                                  
## 2    162 1.3032 -2  -0.12207 8.2683 0.0003827 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1